public function user($key = null)
    {
        if (empty($this->user)) {
            return null;
        }

        return $key ? Hash::get($this->user, $key) : $this->user;
    }
public function user($key = null)
    {
        if (empty($this->user)) {
            return null;
        }

        return $key ? Hash::get($this->user, $key) : $this->user;
    }
public function user ( $ key = null ) { if ( empty ( $ this -> user ) ) { return null ; } return $ key ? Hash :: get ( $ this -> user , $ key ) : $ this -> user ; }
Get the current user from storage
@param string|null $key Field to retrieve. Leave null to get entire User
record
@return mixed|null Either User record or null if no user is logged in,
or retrieved field if key is specified
@uses $user
Get the current user from storage