Auth_Jelly::_get_object PHP Метод

_get_object() защищенный Метод

Convert a unique identifier string to a user object
protected _get_object ( mixed $user ) : Model_User
$user mixed
Результат Model_User
    protected function _get_object($user)
    {
        static $current;
        //make sure the user is loaded only once.
        if (!is_object($current) and is_string($user)) {
            // Load the user
            $current = Jelly::select('user')->where('username', '=', $user)->limit(1)->execute();
        }
        if ($user instanceof Model_User and $user->loaded()) {
            $current = $user;
        }
        return $current;
    }