Improve login form error messages
							parent
							
								
									b400f0c4e5
								
							
						
					
					
						commit
						94e8b2e6af
					
				|  | @ -12,14 +12,12 @@ | |||
| 		)); | ||||
| 		 | ||||
| 		if(!$validator->isValid($_POST)) { | ||||
| 			$HTML->ReplaceLayoutInhalt("%%LOGINMESSAGE%%", "Bitte gebe Benutzername und Passwort an."); | ||||
| 			$HTML->ReplaceLayoutInhalt("%%LOGINMESSAGE%%", "Bitte gebe Benutzername (Vor- und Nachname) und Passwort ein."); | ||||
| 		} | ||||
| 		else { | ||||
| 			$statementUser = $RUNTIME['PDO']->prepare("SELECT PrincipalID,FirstName,LastName,Email,UserLevel FROM UserAccounts WHERE FirstName = ? AND LastName = ? LIMIT 1"); | ||||
| 			$statementUser->execute(explode(" ", trim($_POST['username'])));  | ||||
| 
 | ||||
| 			$RUNTIME['MESSAGE']['LOGINERROR'] = "Benutzername nicht gefunden!"; | ||||
| 
 | ||||
| 			while($rowUser = $statementUser->fetch())  | ||||
| 			{ | ||||
| 				$statementAuth = $RUNTIME['PDO']->prepare("SELECT passwordHash,passwordSalt FROM auth WHERE UUID = ? LIMIT 1"); | ||||
|  | @ -47,11 +45,9 @@ | |||
| 						die(); | ||||
| 					} | ||||
| 				} | ||||
| 
 | ||||
| 				$RUNTIME['MESSAGE']['LOGINERROR'] = "Passwort falsch!"; | ||||
| 			} | ||||
| 
 | ||||
| 			$HTML->ReplaceLayoutInhalt("%%LOGINMESSAGE%%", $RUNTIME['MESSAGE']['LOGINERROR']);  | ||||
| 			$HTML->ReplaceLayoutInhalt("%%LOGINMESSAGE%%", "Benutzername und/oder Passwort falsch.");  | ||||
| 			$HTML->ReplaceLayoutInhalt("%%LASTUSERNAME%%", htmlspecialchars($_POST['username'])); 	 | ||||
| 		} | ||||
| 	} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 Anonymous Contributor
						Anonymous Contributor