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; }