Propage portal logout to handler (#595)

This commit is contained in:
Xavier Guimard 2016-12-22 20:18:58 +00:00
parent 13514267e0
commit ad6b42e9f1
2 changed files with 4 additions and 2 deletions

View File

@ -610,6 +610,7 @@ sub abort {
# Delete current user from local cache entry.
sub localUnlog {
my ( $class, $id ) = @_;
$class->lmLog('Local handler logout','debug');
if ( $id //= $class->fetchId ) {
# Delete thread datas
@ -629,9 +630,9 @@ sub localUnlog {
## @rmethod protected int unlog()
# Call localUnlog() then goToPortal() to unlog the current user.
# @return Constant value returned by goToPortal()
sub unlog ($$) {
sub unlog {
my $class = shift;
$class->localUnlog;
$class->localUnlog(@_);
$class->updateStatus('LOGOUT');
return $class->goToPortal( '/', 'logout=1' );
}

View File

@ -444,6 +444,7 @@ sub _deleteSession {
) unless ($preserveCookie);
}
HANDLER->unlog($session->id);
$session->remove;
# Create an obsolete cookie to remove it