Merge pull request #3940 from nextcloud/downstream-27048

Add postLogout hook to finish sessions from external session managers…
This commit is contained in:
Lukas Reschke 2017-03-20 10:15:34 +01:00 committed by GitHub
commit 373bfea427
1 changed files with 3 additions and 0 deletions

View File

@ -14,6 +14,7 @@
* @author Robin McCorkell <robin@mccorkell.me.uk> * @author Robin McCorkell <robin@mccorkell.me.uk>
* @author Thomas Müller <thomas.mueller@tmit.eu> * @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Vincent Petry <pvince81@owncloud.com> * @author Vincent Petry <pvince81@owncloud.com>
* @author Felix Rupp <kontakt@felixrupp.com>
* *
* @license AGPL-3.0 * @license AGPL-3.0
* *
@ -70,6 +71,7 @@ use Symfony\Component\EventDispatcher\GenericEvent;
* - preRememberedLogin(string $uid) * - preRememberedLogin(string $uid)
* - postRememberedLogin(\OC\User\User $user) * - postRememberedLogin(\OC\User\User $user)
* - logout() * - logout()
* - postLogout()
* *
* @package OC\User * @package OC\User
*/ */
@ -796,6 +798,7 @@ class Session implements IUserSession, Emitter {
$this->setToken(null); $this->setToken(null);
$this->unsetMagicInCookie(); $this->unsetMagicInCookie();
$this->session->clear(); $this->session->clear();
$this->manager->emit('\OC\User', 'postLogout');
} }
/** /**