Skip to content

Commit

Permalink
Revert "reset code upon successful verification so it can't be used a…
Browse files Browse the repository at this point in the history
…gain"

This reverts commit 2aa4e88.

The code is already reset by ScratchSpecialPage::verifSucceeded
when verification succeeds.
  • Loading branch information
Kenny2github committed Aug 11, 2020
1 parent 2aa4e88 commit 45a9ee4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion SpecialScratchLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ function onPost($out, $request) {
if ($user == null) return;
// now that we have passed all the other hurdles, log in the user
// set the logged in user to the user found by that name
$this->resetCode($out, $request);
$request->getSession()->setUser($user);
$request->getSession()->save();

Expand Down
2 changes: 0 additions & 2 deletions SpecialScratchPasswordReset.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ function onPost($out, $request) {
AuthManager::singleton()->changeAuthenticationData($req);
// display the password and pass the username to log in with
$out->addWikiMsg('scratchpasswordreset-success', $req->password, $user->getName());
//also reset the code so it can't be used twice
$this->resetCode($out, $request);
}

// reset the code associated with the current user's session
Expand Down

0 comments on commit 45a9ee4

Please sign in to comment.