Example #1
0
 public static function getUser($field = null)
 {
     $user = Session::read('Admin.user');
     if ($field === null) {
         return $user;
     } else {
         return $user[$field];
     }
 }
Example #2
0
 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;
     }
 }
Example #3
0
 public static function captcha($value)
 {
     return Session::check('captcha') && strtolower(trim($value)) == Session::read('captcha');
 }