mirror of
https://github.com/nextcloud/server.git
synced 2026-03-01 13:00:44 -05:00
Merge pull request #27333 from nextcloud/backport/27328/stable21
[stable21] emit UserLoggedInEvent on apache auth
This commit is contained in:
commit
390bd12c8a
1 changed files with 12 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue