Permalink
Browse files

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.
  • Loading branch information...
1 parent 3584856 commit 70b235e13d3b8ba12977c1699eb108e35a73f069 @bharat bharat committed Jan 29, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 modules/gallery/helpers/auth.php
@@ -30,12 +30,12 @@ static function get_login_form($url) {
}
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);
}

0 comments on commit 70b235e

Please sign in to comment.