Changeset View
Changeset View
Standalone View
Standalone View
src/applications/settings/panel/PhabricatorPasswordSettingsPanel.php
| Show All 40 Lines | public function processRequest(AphrontRequest $request) { | ||||
| $key = $request->getStr('key'); | $key = $request->getStr('key'); | ||||
| $password_type = PhabricatorAuthPasswordResetTemporaryTokenType::TOKENTYPE; | $password_type = PhabricatorAuthPasswordResetTemporaryTokenType::TOKENTYPE; | ||||
| $token = null; | $token = null; | ||||
| if ($key) { | if ($key) { | ||||
| $token = id(new PhabricatorAuthTemporaryTokenQuery()) | $token = id(new PhabricatorAuthTemporaryTokenQuery()) | ||||
| ->setViewer($user) | ->setViewer($user) | ||||
| ->withObjectPHIDs(array($user->getPHID())) | ->withTokenResources(array($user->getPHID())) | ||||
| ->withTokenTypes(array($password_type)) | ->withTokenTypes(array($password_type)) | ||||
| ->withTokenCodes(array(PhabricatorHash::digest($key))) | ->withTokenCodes(array(PhabricatorHash::digest($key))) | ||||
| ->withExpired(false) | ->withExpired(false) | ||||
| ->executeOne(); | ->executeOne(); | ||||
| } | } | ||||
| $e_old = true; | $e_old = true; | ||||
| $e_new = true; | $e_new = true; | ||||
| ▲ Show 20 Lines • Show All 160 Lines • Show Last 20 Lines | |||||