Added $checkSession parameter to User::getIsGuest() and getId().