public function send($email) { try { $aParse['email'] = htmlspecialchars($email); UsersForgot::send($email); } catch (Exception $e) { CMSLog::addMessage('users', $e); if (!empty($_REQUEST['ajaxRequest'])) { $this->aParse['forgotFailed'] = true; $this->output(''); } else { /** * @todo Избавиться от этой зависимости */ $this->addAlert(\plugins\MessageDictionary\Plugin::getMessage('users.forgot.accountNotFound')); $this->jumpBack(); } } if (!empty($_REQUEST['ajaxRequest'])) { $this->aParse['forgotSuccess'] = true; $this->output(); } else { /** * @todo Избавиться от этой зависимости */ $this->addAlert(\plugins\MessageDictionary\Plugin::getMessage('users.forgot.sent')); $this->jumpBack(); } }
public function __construct($urlInfo = array()) { parent::__construct($urlInfo); if (!UsersLogin::isLogined()) { /** * @todo Исправить проблему с зависимостью от MessageDictionary */ $this->addError(\plugins\MessageDictionary\Plugin::getMessage(self::MessageKey)); $this->jump(Login::getUrl()); } $this->reloadCurrentSession(); }
public function __construct($urlInfo = array()) { parent::__construct($urlInfo); if (!UsersLogin::isLogined()) { /** * @todo Избавиться от этой зависимости */ $this->addAlert(\plugins\MessageDictionary\Plugin::getMessage('need_auth')); $this->jump('/'); throw new Exception('User not logined'); } $this->aProfile = UsersLogin::getCurrentSession(); }