Auth: add logout hook
This commit is contained in:
parent
9999f46c78
commit
1d7387fb18
1 changed files with 2 additions and 0 deletions
|
@ -281,6 +281,7 @@ class Auth {
|
|||
* @return void
|
||||
*/
|
||||
public static function logout() {
|
||||
$user = self :: $user;
|
||||
$method = (
|
||||
self :: $logged_method?
|
||||
self :: $logged_method:
|
||||
|
@ -292,6 +293,7 @@ class Auth {
|
|||
unset($_SESSION['user']);
|
||||
if (isset($_SESSION['auth_method']))
|
||||
unset($_SESSION['auth_method']);
|
||||
Hook :: trigger('logout', array('method' => $method, 'user' => $user));
|
||||
if ($method)
|
||||
call_user_func(array(self :: $methods[$method], 'logout'));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue