*/
class UserAuthFilter extends BaseFilter implements Filterable {
// Exception constants
- const EXCEPTION_AUTH_DATA_INVALID = 0x0a0;
+ const EXCEPTION_AUTH_DATA_INVALID = 0x1b0;
/**
* The login method we shall choose
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_user')) {
+ // Guest login!
+ $userInstance = Guest::createGuestByUserName($authLogin);
+ } else {
+ // Regular user account
+ $userInstance = User::createUserByUserName($authLogin);
+ }
// Is the password correct?
if ($userInstance->getPasswordHash() !== $authHash) {