diff options
author | Arthur Schiwon <blizzz@arthur-schiwon.de> | 2021-06-01 13:59:40 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-06-01 15:41:04 +0000 |
commit | 2e57360a0d795fbfec1b0fd60554c7020d83ee26 (patch) | |
tree | 9aa2625bac17989a531e454f027b0852c884eaae /lib | |
parent | 25c24c2b6e48d159406d57cf0d858a89666cefee (diff) | |
download | nextcloud-server-2e57360a0d795fbfec1b0fd60554c7020d83ee26.tar.gz nextcloud-server-2e57360a0d795fbfec1b0fd60554c7020d83ee26.zip |
emit UserLoggedInEvent on apache auth
- post_login OC_Hook is barely used or listened to
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
Diffstat (limited to 'lib')
-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); } |