Esempio n. 1
0
 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();
     }
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 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();
 }