src/Helpers/User.php
public function createGuest()
    {
        /* Get the namespace */
        $model = $this->getUserModel();
        if ($model) {
            $guest = new $model();
            $guest->name = 'Guest';
            $guest->email = 'guest@example.com';
        } else {
            $guest = (object)['name' => 'Guest', 'email' => 'guest@example.com'];
        }
        return $guest;
    }
public function createGuest()
    {
        /* Get the namespace */
        $model = $this->getUserModel();
        if ($model) {
            $guest = new $model();
            $guest->name = 'Guest';
            $guest->email = 'guest@example.com';
        } else {
            $guest = (object)['name' => 'Guest', 'email' => 'guest@example.com'];
        }
        return $guest;
    }
public function createGuest ( ) { /* Get the namespace */ $ model = $ this -> getUserModel ( ) ; if ( $ model ) { $ guest = new $ model ( ) ; $ guest -> name = 'Guest' ; $ guest -> email = 'guest@example.com' ; } else { $ guest = ( object ) [ 'name' => 'Guest' , 'email' => 'guest@example.com' ] ; } return $ guest ; }
Return an instance of a guest user, uses user model if exists.
@return object
Return an instance of a guest user uses user model if exists .