Skip to content

Commit

Permalink
In auth::login() make the user active before trying to save it, else
Browse files Browse the repository at this point in the history
the validation code fails because it expects there to be an active
user.
  • Loading branch information
bharat committed Jan 29, 2010
1 parent 3584856 commit 70b235e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/gallery/helpers/auth.php
Expand Up @@ -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);
}
Expand Down

0 comments on commit 70b235e

Please sign in to comment.