Skip to content

Commit

Permalink
reverting to previous solution plus added check in driver
Browse files Browse the repository at this point in the history
  • Loading branch information
dre1080 committed Oct 26, 2011
1 parent 34ac196 commit f25e1da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classes/warden/driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function logged_in($role = null)
'where' => array('authentication_token' => $auth_token)
));

if (!is_null($user)) {
if ($user && !$user->is_access_locked()) {
$this->set_user($user);
}
}
Expand Down
3 changes: 2 additions & 1 deletion classes/warden/model/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ public function lock_access()
// Revoke authentication token
$this->authentication_token = null;

return $this->save(false);
// Save and make sure session is destroyed completely
return $this->save(false) && Warden::logout(true);
}

/**
Expand Down

0 comments on commit f25e1da

Please sign in to comment.