Skip to content

Commit

Permalink
Error messages split for better explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
Justman100 committed Jun 20, 2022
1 parent 07e43a7 commit 9aab4b4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion install/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -474,10 +474,14 @@ function __destruct() {

if (isset($_POST['passw1'])) {

if ($_POST['passw1'] != $_POST['passw2'] or !preg_match('/^[\w\S]{6,120}$/', $_POST['passw1'])) {
if ($_POST['passw1'] != $_POST['passw2']) {
$displayToUser .= "<div class='alert alert-danger'>{$languageObject->error_password}</div>";
}

if (!preg_match('/^[\w\S]{6,120}$/', $_POST['passw1'])) {
$displayToUser .= "<div class='alert alert-danger'>{$languageObject->passwords_not_meet_req}</div>";
}

if (filter_var($_POST['email'], FILTER_VALIDATE_EMAIL)) {
$email = $_POST['email'];
} else {
Expand Down
1 change: 1 addition & 0 deletions install/languages/de.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<ok_gameserver_data>Die Gameserver Daten wurden erfolgreich hinzugefügt.</ok_gameserver_data>
<passw_1>Passwort</passw_1>
<passw_2>Passwort wiederhohlen</passw_2>
<passwords_not_meet_req>Passwort entspricht nicht den Anforderungen</passwords_not_meet_req>
<prefix1>Benutzername vorgeben</prefix1>
<prefix2>Wird der Benutzername vorgegeben, wird beim Anlegen neuer Benutzer an den vorgegebenen Namen nur noch eine fortzählende Nummer angehängt.Es dürfen nur kleine Buchstaben und Zahlen benutzt werden.</prefix2>
<prefix3>Benutzername</prefix3>
Expand Down
1 change: 1 addition & 0 deletions install/languages/en.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<ok_gameserver_data>The gameserver data has been added.</ok_gameserver_data>
<passw_1>Password</passw_1>
<passw_2>Repeat new password</passw_2>
<passwords_not_meet_req>Password does not meet the requirements</passwords_not_meet_req>
<prefix1>Define usernames</prefix1>
<prefix2>If you define a username the users unique ids will be appended to the defined name. Only small letters and numbers are allowed. Example: customer will be customer2 and counting</prefix2>
<prefix3>Default username</prefix3>
Expand Down

0 comments on commit 9aab4b4

Please sign in to comment.