diff --git a/modules/gatewayInterface.py b/modules/gatewayInterface.py index 92e0c91f..e499245c 100644 --- a/modules/gatewayInterface.py +++ b/modules/gatewayInterface.py @@ -356,14 +356,14 @@ class GatewayInterface: user = next((u for u in users if u.get("username") == username), None) if not user: - return None + raise ValueError("Benutzer nicht gefunden") if not self._verifyPassword(password, user.get("hashedPassword", "")): - return None + raise ValueError("Falsches Passwort") # Check if the user is disabled if user.get("disabled", False): - return None + raise ValueError("Benutzer ist deaktiviert") # Create a copy without password hash authenticatedUser = {**user}