/** * 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(); }
/** * Return debug mode. * * @return var */ public function getDebugMode() { return CWebUser::getDebugMode(); }