Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions core/Controller/LostController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down Expand Up @@ -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.'));
Expand All @@ -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);

Expand Down
Loading