From 70b235e13d3b8ba12977c1699eb108e35a73f069 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Thu, 28 Jan 2010 21:33:01 -0800 Subject: 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. --- modules/gallery/helpers/auth.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules') 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); } -- cgit v1.2.3