initiatePasswordResetProcess() public method

The email confirmation link will contain the generated reset token.
public initiatePasswordResetProcess ( string $loginOrEmail, string $newPassword )
$loginOrEmail string The user's login or email address.
$newPassword string The un-hashed/unencrypted password.
Esempio n. 1
0
 /**
  * Saves password reset info and sends confirmation email.
  *
  * @param QuickForm2 $form
  * @return array Error message(s) if an error occurs.
  */
 protected function resetPasswordFirstStep($form)
 {
     $loginMail = $form->getSubmitValue('form_login');
     $password = $form->getSubmitValue('form_password');
     try {
         $this->passwordResetter->initiatePasswordResetProcess($loginMail, $password);
     } catch (Exception $ex) {
         Log::debug($ex);
         return array($ex->getMessage());
     }
     return null;
 }