From fd3d7c394ad863f631b1909c5471529de39e2f18 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Wed, 4 Nov 2020 21:19:16 +0100 Subject: [PATCH] Deprecate old user manager events for user creation Signed-off-by: Morris Jobke --- lib/private/User/Manager.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php index eceeed2050..debe2f14f2 100644 --- a/lib/private/User/Manager.php +++ b/lib/private/User/Manager.php @@ -365,6 +365,7 @@ class Manager extends PublicEmitter implements IUserManager { throw new \InvalidArgumentException($l->t('The username is already being used')); } + /** @depreacted 21.0.0 use CreateUserEvent event with the IEventDispatcher instead */ $this->emit('\OC\User', 'preCreateUser', [$uid, $password]); $this->eventDispatcher->dispatchTyped(new CreateUserEvent($uid, $password)); $state = $backend->createUser($uid, $password); @@ -373,6 +374,7 @@ class Manager extends PublicEmitter implements IUserManager { } $user = $this->getUserObject($uid, $backend); if ($user instanceof IUser) { + /** @depreacted 21.0.0 use UserCreatedEvent event with the IEventDispatcher instead */ $this->emit('\OC\User', 'postCreateUser', [$user, $password]); $this->eventDispatcher->dispatchTyped(new UserCreatedEvent($user, $password)); }