diff --git a/core/Controller/LostController.php b/core/Controller/LostController.php index a402c358cc88c..57e085c89bd57 100644 --- a/core/Controller/LostController.php +++ b/core/Controller/LostController.php @@ -51,7 +51,7 @@ /** * Class LostController * - * Successfully changing a password will emit the post_passwordReset hook. + * Successfully changing a password will dispatch a PasswordResetEvent. * * @package OC\Core\Controller */ @@ -203,7 +203,6 @@ public function setPassword(string $token, string $userId, string $password, boo $user = $this->userManager->get($userId); $this->eventDispatcher->dispatchTyped(new BeforePasswordResetEvent($user, $password)); - \OC_Hook::emit('\OC\Core\LostPassword\Controller\LostController', 'pre_passwordReset', ['uid' => $userId, 'password' => $password]); if (strlen($password) > IUserManager::MAX_PASSWORD_LENGTH) { throw new HintException('Password too long', $this->l10n->t('Password is too long. Maximum allowed length is 469 characters.')); @@ -214,7 +213,6 @@ public function setPassword(string $token, string $userId, string $password, boo } $this->eventDispatcher->dispatchTyped(new PasswordResetEvent($user, $password)); - \OC_Hook::emit('\OC\Core\LostPassword\Controller\LostController', 'post_passwordReset', ['uid' => $userId, 'password' => $password]); $this->twoFactorManager->clearTwoFactorPending($userId);