validation für login
This commit is contained in:
parent
fdb02b051c
commit
bdc491fbfa
@ -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"]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user