diff options
author | Joas Schilling <coding@schilljs.com> | 2023-07-27 19:57:10 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2023-07-28 14:11:19 +0200 |
commit | 68fc9b48c24bf810488c5910da2feadd10587e51 (patch) | |
tree | cf183d9afa8f2fa5a9342341f4cf21d51bc6ad50 /lib/private/Accounts | |
parent | 9bf812ac6c29f7722ba6db876dbabbc1b065dce1 (diff) | |
download | nextcloud-server-68fc9b48c24bf810488c5910da2feadd10587e51.tar.gz nextcloud-server-68fc9b48c24bf810488c5910da2feadd10587e51.zip |
feat!: Migrate AccountManager event to typed event
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Accounts')
-rw-r--r-- | lib/private/Accounts/AccountManager.php | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Accounts/AccountManager.php b/lib/private/Accounts/AccountManager.php index 43d18a0d941..95199d8380c 100644 --- a/lib/private/Accounts/AccountManager.php +++ b/lib/private/Accounts/AccountManager.php @@ -41,6 +41,7 @@ use libphonenumber\NumberParseException; use libphonenumber\PhoneNumberFormat; use libphonenumber\PhoneNumberUtil; use OC\Profile\TProfileHelper; +use OCP\Accounts\UserUpdatedEvent; use OCP\Cache\CappedMemoryCache; use OCA\Settings\BackgroundJobs\VerifyUserData; use OCP\Accounts\IAccount; @@ -51,6 +52,7 @@ use OCP\Accounts\PropertyDoesNotExistException; use OCP\BackgroundJob\IJobList; use OCP\DB\QueryBuilder\IQueryBuilder; use OCP\Defaults; +use OCP\EventDispatcher\IEventDispatcher; use OCP\IConfig; use OCP\IDBConnection; use OCP\IL10N; @@ -62,8 +64,6 @@ use OCP\Security\ICrypto; use OCP\Security\VerificationToken\IVerificationToken; use OCP\Util; use Psr\Log\LoggerInterface; -use Symfony\Component\EventDispatcher\EventDispatcherInterface; -use Symfony\Component\EventDispatcher\GenericEvent; use function array_flip; use function iterator_to_array; use function json_decode; @@ -109,7 +109,7 @@ class AccountManager implements IAccountManager { public function __construct( private IDBConnection $connection, private IConfig $config, - private EventDispatcherInterface $eventDispatcher, + private IEventDispatcher $dispatcher, private IJobList $jobList, private LoggerInterface $logger, private IVerificationToken $verificationToken, @@ -255,10 +255,10 @@ class AccountManager implements IAccountManager { } if ($updated) { - $this->eventDispatcher->dispatch( - 'OC\AccountManager::userUpdated', - new GenericEvent($user, $data) - ); + $this->dispatcher->dispatchTyped(new UserUpdatedEvent( + $user, + $data, + )); } return $data; |