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 Morris Jobke
parent e30c80c490
commit 6d1ecf2218
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 0 additions and 4 deletions

View File

@ -523,10 +523,6 @@ class Server extends ServerContainer implements IServerContainer {
$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) { $userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
/** @var \OC\User\User $user */ /** @var \OC\User\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 \OC\User\User $user */ /** @var \OC\User\User $user */