Ejemplo n.º 1
0
 /**
  * prepareExecute
  *
  * @return  void
  */
 protected function prepareExecute()
 {
     if (!UserHelper::isLogin()) {
         UserHelper::goToLogin();
     }
     parent::prepareExecute();
 }
Ejemplo n.º 2
0
 /**
  * prepareExecute
  *
  * @return  void
  */
 protected function prepareExecute()
 {
     if (!UserHelper::isLogin()) {
         UserHelper::goToLogin($this->app->uri->full);
     }
     parent::prepareExecute();
 }
Ejemplo n.º 3
0
 /**
  * prepareExecute
  *
  * @return  void
  */
 protected function prepareExecute()
 {
     if (UserHelper::isLogin()) {
         $this->redirect($this->getSuccessRedirect());
         return;
     }
     parent::prepareExecute();
 }
Ejemplo n.º 4
0
 /**
  * prepareExecute
  *
  * @return  void
  */
 protected function prepareExecute()
 {
     if (UserHelper::isLogin()) {
         $warder = WarderHelper::getPackage();
         $this->redirect($this->router->route($warder->get('frontend.redirect.login', 'home')));
         return;
     }
     parent::prepareExecute();
 }
Ejemplo n.º 5
0
 /**
  * prepareExecute
  *
  * @return  void
  */
 protected function prepareExecute()
 {
     if (UserHelper::isLogin()) {
         $warder = WarderHelper::getPackage();
         $this->redirect($this->router->route($warder->get('frontend.redirect.login', 'home')));
         return;
     }
     parent::prepareExecute();
     $this->token = UserHelper::getToken($this->data['email']);
     $this->data['activation'] = UserHelper::hashPassword($this->token);
 }
Ejemplo n.º 6
0
 /**
  * prepareExecute
  *
  * @return  void
  */
 protected function prepareExecute()
 {
     if (UserHelper::isLogin()) {
         $warder = WarderHelper::getPackage();
         $this->redirect($this->router->route($warder->get('frontend.redirect.login', 'home')));
         return;
     }
     parent::prepareExecute();
     $this->data['email'] = $this->input->getEmail('email');
     $this->data['token'] = $this->input->get('token');
 }
Ejemplo n.º 7
0
 /**
  * prepareExecute
  *
  * @return  void
  */
 protected function prepareExecute()
 {
     $return = $this->input->getBase64($this->package->get('frontend.login.return_key', 'return'));
     if (UserHelper::isLogin()) {
         if ($return) {
             $this->app->redirect(base64_decode($return));
         } else {
             $this->app->redirect($this->getHomeRedirect());
         }
         return;
     }
     if ($return) {
         $this->setUserState($this->getContext('return'), $return);
     }
     parent::prepareExecute();
 }
Ejemplo n.º 8
0
 /**
  * authorise
  *
  * @return  boolean
  */
 public static function authorise()
 {
     $config = Ioc::getConfig();
     $requestLogin = $config->get('route.extra.warder.require_login', true);
     return UserHelper::isLogin() || !$requestLogin;
 }