validation für login

This commit is contained in:
PBBFA23AHR committed 2025-07-03 11:58:58 +02:00
1 parent fdb02b051c
commit bdc491fbfa
1 file changed
+6 -1
+6 -1
View File
@@ -120,8 +120,13 @@ class UserController{
public function login(){
$user = $this->db->getUserByEmail($_POST["email"]);
$this->validateLoginForm();
if(!$user){
echo "Benutzer nicht gefunden";
$this->loginErrors['email'] = "Email oder Passwort ist falsch";
$this->view->setDoMethodName("showUserLoginForm");
$this->showUserLoginForm();
return;
}
$hash = hash('sha256', $_POST["password"] . $user["salt"]);