throw new UserAuthorizationException($this, self::EXCEPTION_AUTH_DATA_INVALID);
} // END - if
- // Now, try to get a user instance
- $userInstance = User::createUserByUserName($authLogin);
+ // Now, try to get a user or guest instance
+ if ($authLogin == $this->getConfigInstance()->readConfig('guest_login_username')) {
+ // Guest login!
+ $userInstance = Guest::createGuestByUserName($authLogin);
+ } else {
+ // Regular user account
+ $userInstance = User::createUserByUserName($authLogin);
+ }
// Is the password correct?
if ($userInstance->getPasswordHash() !== $authHash) {