Example #1
0
 /**
  *
  */
 public function init()
 {
     $this->session = Yii::app()->getSession();
     if (null === $this->session->get($this->key)) {
         $this->session->add($this->key, []);
     }
 }
Example #2
0
 /**
  *
  */
 public function init()
 {
     $this->session = Yii::app()->getSession();
     $this->productRepository = Yii::app()->getComponent('productRepository');
     if (null === $this->session->get($this->key)) {
         $this->session->add($this->key, []);
     }
 }
 protected function preFilter($filterChain)
 {
     /** @var CHttpSession */
     self::$session = Yii::app()->session;
     if (self::$session->get('appointmentBuilder')) {
         self::$current = self::$session->get('appointmentBuilder');
     }
     return parent::preFilter($filterChain);
 }
Example #4
0
 public function filterEnforcelogin($filterChain)
 {
     $session = new CHttpSession();
     $session->open();
     $userSesion = $session->get('usuarioSesion');
     if (empty($userSesion)) {
         $this->redirect("login.php");
     }
     $filterChain->run();
 }
Example #5
0
 public function verificarSessiousuario()
 {
     $session = new CHttpSession();
     $session->open();
     $userSesion = $session->get('usuarioSesion');
     if (empty($userSesion)) {
         $RESP = FALSE;
     } else {
         $RESP = TRUE;
     }
     return $RESP;
 }
Example #6
0
 /**
  * This is the default 'index' action that is invoked
  * when an action is not explicitly requested by users.
  */
 public function actionIndex()
 {
     $session = new CHttpSession();
     $session->open();
     $userSesion = $session->get('usuarioSesion');
     if (empty($userSesion)) {
         $this->redirect("login.php");
     } else {
         $this->render('index');
     }
     // renders the view file 'protected/views/site/index.php'
     // using the default layout 'protected/views/layouts/main.php'
 }
Example #7
0
 /**
  * @return mixed|null
  */
 public function get()
 {
     return $this->session->get($this->key);
 }