mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Improved external logout handling
This commit is contained in:
parent
f0a3ea1348
commit
0a21485003
3 changed files with 4 additions and 3 deletions
|
|
@ -97,7 +97,7 @@ class Application extends App implements IBootstrap
|
||||||
$userSession->listen('\OC\User', 'logout', function($user) {
|
$userSession->listen('\OC\User', 'logout', function($user) {
|
||||||
\OC::$server->getSession()['snappymail-password'] = '';
|
\OC::$server->getSession()['snappymail-password'] = '';
|
||||||
SnappyMailHelper::loadApp();
|
SnappyMailHelper::loadApp();
|
||||||
\RainLoop\Api::LogoutCurrentLogginedUser();
|
\RainLoop\Api::Actions()->Logout(true);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -431,8 +431,10 @@ trait UserAuth
|
||||||
|
|
||||||
public function Logout(bool $bMain) : void
|
public function Logout(bool $bMain) : void
|
||||||
{
|
{
|
||||||
|
// Utils::ClearCookie(Utils::SESSION_TOKEN);
|
||||||
Utils::ClearCookie(self::AUTH_ADDITIONAL_TOKEN_KEY);
|
Utils::ClearCookie(self::AUTH_ADDITIONAL_TOKEN_KEY);
|
||||||
$bMain && Utils::ClearCookie(self::AUTH_SPEC_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
|
public static function LogoutCurrentLogginedUser() : bool
|
||||||
{
|
{
|
||||||
// TODO: kill SignMe data to prevent automatic login?
|
static::Actions()->Logout(true);
|
||||||
Utils::ClearCookie(Utils::SESSION_TOKEN);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue