diff options
author | Christoph Wurst <ChristophWurst@users.noreply.github.com> | 2021-06-01 17:38:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 17:38:41 +0200 |
commit | 84584959b09ce3dbde04324154934e6c8eb1d1bd (patch) | |
tree | ab11a25d9030934defb7da4c3b00d05171129533 | |
parent | 6ea8f6f549237a0b09d8659be68aef244f531ecc (diff) | |
parent | 6ac4eafcf9e62732473344346e7cded1de036953 (diff) | |
download | nextcloud-server-84584959b09ce3dbde04324154934e6c8eb1d1bd.tar.gz nextcloud-server-84584959b09ce3dbde04324154934e6c8eb1d1bd.zip |
Merge pull request #27328 from nextcloud/fix/noid/UserLoggedInEvent-apache-auth
emit UserLoggedInEvent on apache auth
-rw-r--r-- | lib/private/legacy/OC_User.php | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/legacy/OC_User.php b/lib/private/legacy/OC_User.php index c8d9b51eaba..3638a32589d 100644 --- a/lib/private/legacy/OC_User.php +++ b/lib/private/legacy/OC_User.php @@ -36,7 +36,10 @@ * */ +use OCP\EventDispatcher\IEventDispatcher; use OCP\ILogger; +use OCP\IUserManager; +use OCP\User\Events\UserLoggedInEvent; /** * This class provides wrapper methods for user management. Multiple backends are @@ -186,6 +189,15 @@ class OC_User { 'isTokenLogin' => false, ] ); + /** @var IEventDispatcher $dispatcher */ + $dispatcher = \OC::$server->get(IEventDispatcher::class); + $dispatcher->dispatchTyped(new UserLoggedInEvent( + \OC::$server->get(IUserManager::class)->get($uid), + $uid, + '', + false) + ); + //trigger creation of user home and /files folder \OC::$server->getUserFolder($uid); } |