Esempio n. 1
0
 /**
  * Инициализация
  *
  */
 public function Init()
 {
     $this->oMapperTopic = $this->oMapper = E::GetMapper(__CLASS__);
     $this->oUserCurrent = E::ModuleUser()->GetUserCurrent();
     $this->aTopicTypesObjects = $this->getContentTypes(array('content_active' => 1));
     $this->aTopicTypes = array_keys($this->aTopicTypesObjects);
 }
Esempio n. 2
0
 /**
  * Инициализация
  *
  */
 public function Init()
 {
     $this->oMapper = E::GetMapper(__CLASS__);
     $this->oUserCurrent = E::ModuleUser()->GetUserCurrent();
     //  LS-compatible
     $this->oMapperBlog = $this->oMapper;
 }
Esempio n. 3
0
 /**
  * Инициализация модуля
  * Создаём локальный экземпляр модуля Viewer
  * Момент довольно спорный, но позволяет избавить основной шаблон от мусора уведомлений
  *
  */
 public function Init()
 {
     $this->oViewerLocal = E::ModuleViewer()->GetLocalViewer();
     $this->oMapper = E::GetMapper(__CLASS__);
     $this->sDir = Config::Get('module.notify.dir');
     $this->sPrefix = Config::Get('module.notify.prefix');
 }
Esempio n. 4
0
 /**
  * Инициализация
  *
  */
 public function Init()
 {
     $this->oMapper = E::GetMapper(__CLASS__);
     // * Проверяем есть ли у юзера сессия, т.е. залогинен или нет
     $iUserId = intval(E::ModuleSession()->Get('user_id'));
     if ($iUserId && ($oUser = $this->GetUserById($iUserId)) && $oUser->getActivate()) {
         if ($this->oSession = $oUser->getCurrentSession()) {
             if ($this->oSession->GetSessionExit()) {
                 // Сессия была закрыта
                 $this->Logout();
                 return;
             }
             $this->oUserCurrent = $oUser;
         }
     }
     // Если сессия оборвалась по таймауту (не сам пользователь ее завершил),
     // то пытаемся автоматически авторизоваться
     if (!$this->oUserCurrent) {
         $this->AutoLogin();
     }
     // * Обновляем сессию
     if (isset($this->oSession)) {
         $this->UpdateSession();
     }
 }
Esempio n. 5
0
 /**
  * Инициализация модуля
  */
 public function Init()
 {
     $this->oMapper = E::GetMapper(__CLASS__);
 }
Esempio n. 6
0
 /**
  * Инициализация
  *
  */
 public function Init()
 {
     $this->oMapper = E::GetMapper(__CLASS__);
     $this->oUserCurrent = E::ModuleUser()->GetUserCurrent();
 }