summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-12-27 16:00:09 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-12-27 16:00:09 +0000
commit79d927f7aa76dc0b0eaf103d5e7bfb9072247b47 (patch)
treefd71818a764a88a6b2fb7b926a5cf631be182969
parent7e4ef32530180dd32c6c116f34b39f50baef34e6 (diff)
downloadbrdo-79d927f7aa76dc0b0eaf103d5e7bfb9072247b47.tar.gz
brdo-79d927f7aa76dc0b0eaf103d5e7bfb9072247b47.tar.bz2
#152497 by bjaspan, with more docs from myself: user_external_login() was not updated to latest login process
-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;
}