summaryrefslogtreecommitdiffstats
path: root/lib/private/User
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2019-12-11 09:38:23 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2019-12-11 10:00:24 +0100
commitd808f9c053fb80b0ec042f12e39f7387ca7821ca (patch)
tree16fb70e64dc046adc8319646efb9d31533ba92f4 /lib/private/User
parent68d59915d6084c92799c22196012e32f7bb12be4 (diff)
downloadnextcloud-server-d808f9c053fb80b0ec042f12e39f7387ca7821ca.tar.gz
nextcloud-server-d808f9c053fb80b0ec042f12e39f7387ca7821ca.zip
Add typed events for all user hooks and legacy events
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'lib/private/User')
-rw-r--r--lib/private/User/Session.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php
index 16d3b13cbab..4aa9074b4a4 100644
--- a/lib/private/User/Session.php
+++ b/lib/private/User/Session.php
@@ -900,9 +900,9 @@ class Session implements IUserSession, Emitter {
* logout the user from the session
*/
public function logout() {
- $this->manager->emit('\OC\User', 'logout');
$user = $this->getUser();
- if (!is_null($user)) {
+ $this->manager->emit('\OC\User', 'logout', [$user]);
+ if ($user !== null) {
try {
$this->tokenProvider->invalidateToken($this->session->getId());
} catch (SessionNotAvailableException $ex) {
@@ -914,7 +914,7 @@ class Session implements IUserSession, Emitter {
$this->setToken(null);
$this->unsetMagicInCookie();
$this->session->clear();
- $this->manager->emit('\OC\User', 'postLogout');
+ $this->manager->emit('\OC\User', 'postLogout', [$user]);
}
/**