summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/identity.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-11-28 12:18:08 -0800
committerBharat Mediratta <bharat@menalto.com>2010-11-28 12:18:08 -0800
commit5fb5d10e5aece1726575b8afbac2f7603ea7632e (patch)
tree1ba68631e2b0ba1626be64ced77ca727230e6f3d /modules/gallery/helpers/identity.php
parenteb010554ff963a1f73661bf96d99697abb7dfde4 (diff)
Delete the temporary "user" value from the session when upconverting
the admin account post-install. Fixes #1511.
Diffstat (limited to 'modules/gallery/helpers/identity.php')
-rw-r--r--modules/gallery/helpers/identity.php3
1 files changed, 2 insertions, 1 deletions
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());
}