Beispiel #1
0
 /**
  * Authenticate user.
  */
 protected function authenticateUser()
 {
     $sessionId = CWebUser::checkAuthentication(CWebUser::getSessionCookie());
     if (!$sessionId) {
         CWebUser::setDefault();
     }
     // set the authentication token for the API
     API::getWrapper()->auth = $sessionId;
     // enable debug mode in the API
     API::getWrapper()->debug = CWebUser::getDebugMode();
 }
Beispiel #2
0
 /**
  * Return debug mode.
  *
  * @return var
  */
 public function getDebugMode()
 {
     return CWebUser::getDebugMode();
 }