diff --git a/install/index.php b/install/index.php index 5dc457f8..3893c9a2 100644 --- a/install/index.php +++ b/install/index.php @@ -125,18 +125,7 @@ else if($step == 'finish') { } // 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']; } @@ -147,6 +136,17 @@ else if($step == 'finish') { $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)) { diff --git a/system/templates/install.admin.html.twig b/system/templates/install.admin.html.twig index 1d64eea9..f6ef2e7b 100644 --- a/system/templates/install.admin.html.twig +++ b/system/templates/install.admin.html.twig @@ -9,7 +9,7 @@
- {% set values = ['email', 'account', 'password', 'password_confirm'] %} + {% set values = ['email', account, 'password', 'password_confirm'] %} {% if hasTablePlayers %} {% set values = values|merge(['player_name']) %}