From 45a9ee44cdf7f3873f0e165b2ec865906af124c7 Mon Sep 17 00:00:00 2001 From: Kenny2github Date: Tue, 11 Aug 2020 15:28:13 +0800 Subject: [PATCH] Revert "reset code upon successful verification so it can't be used again" This reverts commit 2aa4e881f1a668e48e7eddcf3b20438439b2bbd4. The code is already reset by ScratchSpecialPage::verifSucceeded when verification succeeds. --- SpecialScratchLogin.php | 1 - SpecialScratchPasswordReset.php | 2 -- 2 files changed, 3 deletions(-) diff --git a/SpecialScratchLogin.php b/SpecialScratchLogin.php index 1f6ac62..47a1759 100644 --- a/SpecialScratchLogin.php +++ b/SpecialScratchLogin.php @@ -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(); diff --git a/SpecialScratchPasswordReset.php b/SpecialScratchPasswordReset.php index 49b06c6..1c6d7b3 100644 --- a/SpecialScratchPasswordReset.php +++ b/SpecialScratchPasswordReset.php @@ -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