コード例 #1
0
ファイル: User.php プロジェクト: Kangaro97/PalmUp
 /**
  * @return bool
  */
 public function isAuth()
 {
     if (empty($this->auth_checker) || $this->isEmpty()) {
         return false;
     }
     /**
      * @var CheckAuthorization $this->auth_checker
      */
     return $this->auth_checker->getResult();
 }
コード例 #2
0
ファイル: CompanyModel.php プロジェクト: Kangaro97/PalmUp
 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;
 }