示例#1
0
 public function logout($enforce = false)
 {
     if (!$enforce && !$this->logoutSupported()) {
         return false;
     }
     if (cfg('global', 'audit_log') == true) {
         $ALOG = new CoreLog(cfg('paths', 'var') . 'nagvis-audit.log', cfg('global', 'dateformat'));
         $ALOG->l('User logged out (' . $this->getUser() . ' / ' . $this->getUserId() . '): ' . $this->sModuleName);
     }
     // Remove the login information
     $this->SESS->aquire();
     $this->SESS->del('logonModule');
     $this->SESS->del('authModule');
     $this->SESS->del('authCredentials');
     $this->SESS->del('authTrusted');
     $this->SESS->del('userPermissions');
     $this->SESS->del('authLogoutPossible');
     //$this->SESS->del('multisiteLogonCookie');
     $this->SESS->commit();
     return true;
 }
示例#2
0
 /**
  * 清空缓存日志
  */
 public static function clear()
 {
     self::$log = '';
 }
示例#3
0
 /**
  * 读取记录配置
  */
 private static function getConfig()
 {
     $cfg = cfg()->get('system', 'error_log');
     if (is_array($cfg)) {
         self::$config = array_merge(self::$config, $cfg);
     }
     if (empty(self::$config['destination']) && self::$config['type'] == 3) {
         self::$config['destination'] = _LogPath_ . "/" . date("Y_m_d") . ".log";
     }
 }