diff --git a/main/auth/reset.php b/main/auth/reset.php index d69b41149e..7132673e2a 100644 --- a/main/auth/reset.php +++ b/main/auth/reset.php @@ -48,6 +48,12 @@ if ($form->validate()) { $userManager = UserManager::getManager(); $userManager->updateUser($user, true); + $user->setConfirmationToken(null); + $user->setPasswordRequestedAt(null); + + Database::getManager()->persist($user); + Database::getManager()->flush(); + Display::addFlash(Display::return_message(get_lang('Updated'))); header('Location: '.api_get_path(WEB_PATH)); exit;