Skip to content

Commit

Permalink
Delete token and time from user password reset after first use -refs …
Browse files Browse the repository at this point in the history
…BT#9897 #TMI
  • Loading branch information
NicoDucou committed Aug 5, 2015
1 parent 0f817c8 commit 5af5c28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions main/auth/reset.php
Expand Up @@ -48,6 +48,12 @@
$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;
Expand Down

0 comments on commit 5af5c28

Please sign in to comment.