emit UserLoggedInEvent on apache auth
- post_login OC_Hook is barely used or listened to Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
parent
25c24c2b6e
commit
2e57360a0d
|
@ -36,7 +36,10 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use OCP\EventDispatcher\IEventDispatcher;
|
||||||
use OCP\ILogger;
|
use OCP\ILogger;
|
||||||
|
use OCP\IUserManager;
|
||||||
|
use OCP\User\Events\UserLoggedInEvent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class provides wrapper methods for user management. Multiple backends are
|
* This class provides wrapper methods for user management. Multiple backends are
|
||||||
|
@ -186,6 +189,15 @@ class OC_User {
|
||||||
'isTokenLogin' => false,
|
'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
|
//trigger creation of user home and /files folder
|
||||||
\OC::$server->getUserFolder($uid);
|
\OC::$server->getUserFolder($uid);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue