From eb010554ff963a1f73661bf96d99697abb7dfde4 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 28 Nov 2010 11:27:25 -0800 Subject: Replace self::func() with ::func() for all public APIs and constants to make overloading easier. Fixes #1510. --- modules/gallery/helpers/identity.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gallery/helpers/identity.php') diff --git a/modules/gallery/helpers/identity.php b/modules/gallery/helpers/identity.php index 5ca024e9..e61aaaf4 100644 --- a/modules/gallery/helpers/identity.php +++ b/modules/gallery/helpers/identity.php @@ -61,7 +61,7 @@ class identity_Core { $session = Session::instance(); if (!($user = $session->get("user"))) { - self::set_active_user($user = self::guest()); + identity::set_active_user($user = self::guest()); } // The installer cannot set a user into the session, so it just sets an id which we should @@ -127,7 +127,7 @@ class identity_Core { $session = Session::instance(); $session->set("user", $user); $session->delete("group_ids"); - self::load_user(); + identity::load_user(); } /** -- cgit v1.2.3 From 5fb5d10e5aece1726575b8afbac2f7603ea7632e Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 28 Nov 2010 12:18:08 -0800 Subject: Delete the temporary "user" value from the session when upconverting the admin account post-install. Fixes #1511. --- modules/gallery/helpers/identity.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules/gallery/helpers/identity.php') diff --git a/modules/gallery/helpers/identity.php b/modules/gallery/helpers/identity.php index e61aaaf4..f45f72c3 100644 --- a/modules/gallery/helpers/identity.php +++ b/modules/gallery/helpers/identity.php @@ -61,7 +61,7 @@ class identity_Core { $session = Session::instance(); if (!($user = $session->get("user"))) { - identity::set_active_user($user = self::guest()); + identity::set_active_user($user = identity::guest()); } // The installer cannot set a user into the session, so it just sets an id which we should @@ -69,6 +69,7 @@ class identity_Core { // @todo set the user name into the session instead of 2 and then use it to get the // user object if ($user === 2) { + $session->delete("user"); // delete it so that identity code isn't confused by the integer auth::login(IdentityProvider::instance()->admin_user()); } -- cgit v1.2.3