summaryrefslogtreecommitdiff
path: root/modules/user/user.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/user/user.module')
-rw-r--r--modules/user/user.module11
1 files changed, 8 insertions, 3 deletions
diff --git a/modules/user/user.module b/modules/user/user.module
index fcc8af2f3..0a0c51332 100644
--- a/modules/user/user.module
+++ b/modules/user/user.module
@@ -89,8 +89,9 @@ function user_external_load($authname) {
}
/**
- * Perform standard Drupal login operations for a user object. The
- * user object must already be authenticated. This function verifies
+ * Perform standard Drupal login operations for a user object.
+ *
+ * The user object must already be authenticated. This function verifies
* that the user account is not blocked/denied and then performs the login,
* updates the login timestamp in the database, invokes hook_user('login'),
* regenerates the session, etc.
@@ -100,6 +101,7 @@ function user_external_load($authname) {
* in user.
* @param $edit
* The array of form values submitted by the user, if any.
+ * This array is passed to hook_user op login.
* @return boolean
* TRUE if the login succeeds, FALSE otherwise.
*/
@@ -113,11 +115,14 @@ function user_external_login($account, $edit = array()) {
user_login_name_validate($form, $state, (array)$account);
if (form_get_errors()) {
+ // Invalid login.
return FALSE;
}
+
+ // Valid login.
global $user;
$user = $account;
- user_login_submit($form, $state, (array)$account);
+ user_authenticate_finalize($state['values']);
return TRUE;
}