Skip to content

Commit

Permalink
Support for accounts.id when there is no accounts.name and accounts.n…
Browse files Browse the repository at this point in the history
…umber
  • Loading branch information
slawkens committed Dec 19, 2024
1 parent ea5e1d4 commit 023f1dc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
24 changes: 12 additions & 12 deletions install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,7 @@
}

// account check
if(isset($_SESSION['var_account'])) {
if(empty($_SESSION['var_account'])) {
$errors[] = $locale['step_admin_account_error_empty'];
}
else if(!Validator::accountName($_SESSION['var_account'])) {
$errors[] = $locale['step_admin_account_error_format'];
}
else if(strtoupper($_SESSION['var_account']) == strtoupper($password)) {
$errors[] = $locale['step_admin_account_error_same'];
}
}
else if(isset($_SESSION['var_account_id'])) {
if(isset($_SESSION['var_account_id'])) {
if(empty($_SESSION['var_account_id'])) {
$errors[] = $locale['step_admin_account_id_error_empty'];
}
Expand All @@ -147,6 +136,17 @@
$errors[] = $locale['step_admin_account_id_error_same'];
}
}
else if(isset($_SESSION['var_account'])) {
if(empty($_SESSION['var_account'])) {
$errors[] = $locale['step_admin_account_error_empty'];
}
else if(!Validator::accountName($_SESSION['var_account'])) {
$errors[] = $locale['step_admin_account_error_format'];
}
else if(strtoupper($_SESSION['var_account']) == strtoupper($password)) {
$errors[] = $locale['step_admin_account_error_same'];
}
}

// password check
if(empty($password)) {
Expand Down
2 changes: 1 addition & 1 deletion system/templates/install.admin.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<form action="{{ constant('BASE_URL') }}install/" method="post" autocomplete="off">
<input type="hidden" name="step" id="step" value="finish" />

{% set values = ['email', 'account', 'password', 'password_confirm'] %}
{% set values = ['email', account, 'password', 'password_confirm'] %}

{% if hasTablePlayers %}
{% set values = values|merge(['player_name']) %}
Expand Down

0 comments on commit 023f1dc

Please sign in to comment.