示例#1
0
文件: Notices.php 项目: fucoso/site
 public function load()
 {
     $data = $this->sessionProvider->read($this->sessionKey);
     if ($data) {
         try {
             $unserialized = unserialize($data);
             if (is_array($unserialized)) {
                 $this->currentData = $unserialized;
             }
         } catch (Exception $e) {
         }
     }
     $this->sessionProvider->remove($this->sessionKey);
 }
示例#2
0
文件: Auth.php 项目: fucoso/site
 public function logout()
 {
     if (!$this->enabled) {
         return false;
     }
     if ($this->isLoggedIn()) {
         $this->sessionProvider->remove($this->sessionKey);
         return true;
     } else {
         return true;
     }
 }