summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-01-28 21:33:01 -0800
committerBharat Mediratta <bharat@menalto.com>2010-01-28 21:33:01 -0800
commit70b235e13d3b8ba12977c1699eb108e35a73f069 (patch)
tree10c32e4aec24857325100c053c3a3917c502bfdf /modules
parent3584856afcf9f745d09dcd56b63932c8bf0716d1 (diff)
In auth::login() make the user active before trying to save it, else
the validation code fails because it expects there to be an active user.
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/helpers/auth.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/helpers/auth.php b/modules/gallery/helpers/auth.php
index bdff2f70..f7d4f7e8 100644
--- a/modules/gallery/helpers/auth.php
+++ b/modules/gallery/helpers/auth.php
@@ -30,12 +30,12 @@ class auth_Core {
}
static function login($user) {
+ identity::set_active_user($user);
if (identity::is_writable()) {
$user->login_count += 1;
$user->last_login = time();
$user->save();
}
- identity::set_active_user($user);
log::info("user", t("User %name logged in", array("name" => $user->name)));
module::event("user_login", $user);
}