![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/module-user/Controller/Adminhtml/Auth/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\User\Controller\Adminhtml\Auth; use Magento\Framework\App\Action\HttpGetActionInterface; /** * Controller for admin user password reset form */ class ResetPassword extends \Magento\User\Controller\Adminhtml\Auth implements HttpGetActionInterface { /** * Display reset forgotten password form * * User is redirected on this action when he clicks on the corresponding link in password reset confirmation email * * @return void */ public function execute() { $passwordResetToken = (string)$this->getRequest()->getQuery('token'); $userId = (int)$this->getRequest()->getQuery('id'); try { $this->_validateResetPasswordLinkToken($userId, $passwordResetToken); // Extend token validity to avoid expiration while this form is // being completed by the user. $user = $this->_userFactory->create()->load($userId); $user->changeResetPasswordLinkToken($passwordResetToken); $user->save(); $this->_view->loadLayout(); $content = $this->_view->getLayout()->getBlock('content'); if ($content) { $content->setData('user_id', $userId)->setData('reset_password_link_token', $passwordResetToken); } $this->_view->renderLayout(); } catch (\Exception $exception) { $this->messageManager->addError(__('Your password reset link has expired.')); $this->_redirect('adminhtml/auth/forgotpassword', ['_nosecret' => true]); return; } } }