summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-11-05 09:37:07 +0100
committerGitHub <noreply@github.com>2020-11-05 09:37:07 +0100
commit12e2b748721c8b89d2ee79cf87d1f0c53e39a568 (patch)
tree0748ea1ee6a7306a19b15339e6ba37b13bc9cc5a /lib
parent6d4d7faf8bdc9aedc3807a2f8a106a7c0910adfc (diff)
parentfd3d7c394ad863f631b1909c5471529de39e2f18 (diff)
downloadnextcloud-server-12e2b748721c8b89d2ee79cf87d1f0c53e39a568.tar.gz
nextcloud-server-12e2b748721c8b89d2ee79cf87d1f0c53e39a568.zip
Merge pull request #23901 from nextcloud/techdebt/noid/deprecate-old-usermanager-events
Deprecate old user manager events for user creation
Diffstat (limited to 'lib')
-rw-r--r--lib/private/User/Manager.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/User/Manager.php b/lib/private/User/Manager.php
index eceeed20504..debe2f14f2e 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));
}