Merge pull request #23917 from nextcloud/backport/23887/stable20
[stable20] Do not emit UserCreatedEvent twice
This commit is contained in:
commit
93211e7ded
|
@ -221,7 +221,6 @@ use OCP\User\Events\BeforeUserLoggedOutEvent;
|
|||
use OCP\User\Events\PasswordUpdatedEvent;
|
||||
use OCP\User\Events\PostLoginEvent;
|
||||
use OCP\User\Events\UserChangedEvent;
|
||||
use OCP\User\Events\UserCreatedEvent;
|
||||
use OCP\User\Events\UserDeletedEvent;
|
||||
use OCP\User\Events\UserLoggedInEvent;
|
||||
use OCP\User\Events\UserLoggedInWithCookieEvent;
|
||||
|
@ -523,10 +522,6 @@ class Server extends ServerContainer implements IServerContainer {
|
|||
$userSession->listen('\OC\User', 'postCreateUser', function ($user, $password) {
|
||||
/** @var \OC\User\User $user */
|
||||
\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) {
|
||||
/** @var \OC\User\User $user */
|
||||
|
|
Loading…
Reference in New Issue