コード例 #1
0
 function init()
 {
     parent::init();
     #$this->view->contentItemUri = $this->Content->getItemUri(); #@deprecated since 5/7/2009 use url()!
     if (empty($this->Content->ItemCountPerPage)) {
         $this->Content->ItemCountPerPage = 15;
     }
 }
コード例 #2
0
 public function init()
 {
     parent::init();
     if (isset($this->_user->loggedIn)) {
         $loggedIn = $this->_user->loggedIn;
         $this->_project = new Project();
         $this->_project->setUserData($loggedIn->uid, $this->_user->getPath(), $loggedIn->name, $loggedIn->email);
     }
 }
コード例 #3
0
 function init()
 {
     parent::init();
     if (!$this->authAllowed) {
         $this->_redirect('/');
         die;
     }
     if ($this->authHTTPS) {
         FrontEnd::checkHTTPS();
     }
     $this->_formRender = isset($this->conf->auth->formRender) ? false : true;
     if (!isset($this->logoutRedirect)) {
         $this->logoutRedirect = '/';
     }
     $this->users = new Users();
     $this->view->mode = 'insert';
 }
コード例 #4
0
ファイル: AdminController.php プロジェクト: jasonhai/onehome
 /**
  * DTOAN ghostkissboy12@gmail.com
  * 
  * set login cookie
  */
 public function init()
 {
     parent::init();
     if (isset(Yii::app()->user->id)) {
         $user = Users::model()->findByPk(Yii::app()->user->id);
         if (empty($user) || Yii::app()->user->status == 0) {
             Yii::app()->user->logout();
             $this->redirect(Yii::app()->createAbsoluteUrl('admin'));
         }
     }
 }
コード例 #5
0
 public function init()
 {
     parent::init();
 }