public function getUser($id = null) : ?Authenticatable
    {
        if ($id === null) {
            return $this->getModel();
        }

        if (is_int($id)) {
            return $this->getById($id);
        }

        if (filter_var($id, FILTER_VALIDATE_EMAIL) !== false) {
            return $this->getByEmail($id);
        }

        return $this->getModel();
    }
public function getUser($id = null) : ?Authenticatable
    {
        if ($id === null) {
            return $this->getModel();
        }

        if (is_int($id)) {
            return $this->getById($id);
        }

        if (filter_var($id, FILTER_VALIDATE_EMAIL) !== false) {
            return $this->getByEmail($id);
        }

        return $this->getModel();
    }
public function getUser ( $ id = null ) : ? Authenticatable { if ( $ id === null ) { return $ this -> getModel ( ) ; } if ( is_int ( $ id ) ) { return $ this -> getById ( $ id ) ; } if ( filter_var ( $ id , FILTER_VALIDATE_EMAIL ) !== false ) { return $ this -> getByEmail ( $ id ) ; } return $ this -> getModel ( ) ; }
Fetch a user.

@param mixed $id
@return \Illuminate\Contracts\Auth\Authenticatable|\Illuminate\Contracts\Auth\Authenticatable|\Laranix\Auth\User\User|null
Fetch a user .