Call to a member function getUserId() on bool