Exemplo n.º 1
0
 /**
  * @return bool
  */
 public function isAuth()
 {
     if (empty($this->auth_checker) || $this->isEmpty()) {
         return false;
     }
     /**
      * @var CheckAuthorization $this->auth_checker
      */
     return $this->auth_checker->getResult();
 }
Exemplo n.º 2
0
 public function userToggleSmsNotify()
 {
     $check_auth = new CheckAuthorization($this->getQemyDb());
     $check_auth->check(true);
     $user = new User($this->getQemyDb(), $check_auth->getUserRow());
     $user->setAuthChecker($check_auth);
     if (!$user->isAuth()) {
         Application::denied();
         $this->setData(array('result' => false));
         return $this;
     }
     $this->setData(array('result' => $user->toggleSmsEnabled()));
     return $this;
 }