Example #1
0
 /**
  * doActionRecoverPassword
  *
  * @return void
  */
 protected function doActionRecoverPassword()
 {
     if ($this->requestRecoverPassword($this->get('email'))) {
         \XLite\Core\TopMessage::addInfo('The confirmation URL link was mailed to email', array('email' => $this->get('email')));
         if ($this->isAJAX()) {
             \XLite\Core\Event::recoverPasswordSent(array('email' => $this->get('email')));
             $this->setSilenceClose();
         } else {
             $this->setReturnURL($this->buildURL());
         }
     } else {
         $this->setReturnURL($this->buildURL('recover_password'));
         if (!$this->isAJAX()) {
             \XLite\Core\TopMessage::addError('There is no user with specified email address');
         }
         \XLite\Core\Event::invalidElement('email', static::t('There is no user with specified email address'));
     }
 }