Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ResetPassword.php
Go to the documentation of this file.
1 <?php
8 
10 {
18  public function execute()
19  {
20  $passwordResetToken = (string)$this->getRequest()->getQuery('token');
21  $userId = (int)$this->getRequest()->getQuery('id');
22  try {
23  $this->_validateResetPasswordLinkToken($userId, $passwordResetToken);
24 
25  $this->_view->loadLayout();
26 
27  $content = $this->_view->getLayout()->getBlock('content');
28  if ($content) {
29  $content->setData('user_id', $userId)->setData('reset_password_link_token', $passwordResetToken);
30  }
31 
32  $this->_view->renderLayout();
33  } catch (\Exception $exception) {
34  $this->messageManager->addError(__('Your password reset link has expired.'));
35  $this->_redirect('adminhtml/auth/forgotpassword', ['_nosecret' => true]);
36  return;
37  }
38  }
39 }
__()
Definition: __.php:13