Skip to content

Commit

Permalink
Use auth::login() when we initially log in the admin user.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Jan 29, 2010
1 parent b6322b1 commit 3584856
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions modules/gallery/helpers/identity.php
Expand Up @@ -68,9 +68,7 @@ static function load_user() {
// upconvert into a user.
// @todo set the user name into the session instead of 2 and then use it to get the user object
if ($user === 2) {
$user = IdentityProvider::instance()->admin_user();
self::set_active_user($user);
$session->set("user", $user);
auth::login(IdentityProvider::instance()->admin_user());
}

if (!$session->get("group_ids")) {
Expand All @@ -82,7 +80,7 @@ static function load_user() {
}
} catch (Exception $e) {
// Log it, so we at least have so notification that we swallowed the exception.
Kohana_Log::add("error", "Load_user Exception: " .
Kohana_Log::add("error", "load_user Exception: " .
$e->getMessage() . "\n" . $e->getTraceAsString());
try {
Session::instance()->destroy();
Expand Down

0 comments on commit 3584856

Please sign in to comment.