fix: no more translation from postCreateUser hook to UserCreatedEvent anymore, as event is already emitted in user manager

Signed-off-by: Tobias Assmann <tobias.assmann@ecsec.de>
This commit is contained in:
Tobias Assmann 2020-11-04 09:11:20 +01:00 committed by backportbot[bot]
parent ae99412cba
commit ed46c5c94a
1 changed files with 0 additions and 4 deletions

View File

@ -508,10 +508,6 @@ class Server extends ServerContainer implements IServerContainer {
$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
/** @var $user \OC\User\User */ /** @var $user \OC\User\User */
\OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]); \OC_Hook::emit('OC_User', 'post_createUser', ['uid' => $user->getUID(), 'password' => $password]);
/** @var IEventDispatcher $dispatcher */
$dispatcher = $this->query(IEventDispatcher::class);
$dispatcher->dispatchTyped(new UserCreatedEvent($user, $password));
}); });
$userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) { $userSession->listen('\OC\User', 'preDelete', function ($user) use ($legacyDispatcher) {
/** @var $user \OC\User\User */ /** @var $user \OC\User\User */