示例#1
0
文件: Auth.php 项目: hernandes/mithos
 public static function getUser($field = null)
 {
     $user = Session::read('Admin.user');
     if ($field === null) {
         return $user;
     } else {
         return $user[$field];
     }
 }
示例#2
0
文件: Auth.php 项目: hernandes/mithos
 public static function getAccount()
 {
     $instance = static::getInstance();
     if (self::loggedIn()) {
         if ($instance->account === null) {
             $instance->account = new Account(Session::read('Site.username'));
         }
         return $instance->account;
     }
 }
示例#3
0
 public static function captcha($value)
 {
     return Session::check('captcha') && strtolower(trim($value)) == Session::read('captcha');
 }