mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 07:35:55 +08:00
Improved external logout handling
This commit is contained in:
parent
f0a3ea1348
commit
0a21485003
|
@ -97,7 +97,7 @@ class Application extends App implements IBootstrap
|
|||
$userSession->listen('\OC\User', 'logout', function($user) {
|
||||
\OC::$server->getSession()['snappymail-password'] = '';
|
||||
SnappyMailHelper::loadApp();
|
||||
\RainLoop\Api::LogoutCurrentLogginedUser();
|
||||
\RainLoop\Api::Actions()->Logout(true);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -431,8 +431,10 @@ trait UserAuth
|
|||
|
||||
public function Logout(bool $bMain) : void
|
||||
{
|
||||
// Utils::ClearCookie(Utils::SESSION_TOKEN);
|
||||
Utils::ClearCookie(self::AUTH_ADDITIONAL_TOKEN_KEY);
|
||||
$bMain && Utils::ClearCookie(self::AUTH_SPEC_TOKEN_KEY);
|
||||
// TODO: kill SignMe data to prevent automatic login?
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -172,8 +172,7 @@ abstract class Api
|
|||
|
||||
public static function LogoutCurrentLogginedUser() : bool
|
||||
{
|
||||
// TODO: kill SignMe data to prevent automatic login?
|
||||
Utils::ClearCookie(Utils::SESSION_TOKEN);
|
||||
static::Actions()->Logout(true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue