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