Skip to content

Commit

Permalink
Allow account_create_character_create even if account_mail_verify is …
Browse files Browse the repository at this point in the history
…activated
  • Loading branch information
slawkens committed Jul 9, 2024
1 parent fcb13f3 commit 203e411
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
7 changes: 0 additions & 7 deletions system/init.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,6 @@

date_default_timezone_set(setting('core.date_timezone'));

setting(
[
'core.account_create_character_create',
setting('core.account_create_character_create') && (!setting('core.mail_enabled') || !setting('core.account_mail_verify'))
]
);

$settingsItemImagesURL = setting('core.item_images_url');
if($settingsItemImagesURL[strlen($settingsItemImagesURL) - 1] !== '/') {
setting(['core.item_images_url', $settingsItemImagesURL . '/']);
Expand Down
18 changes: 9 additions & 9 deletions system/pages/account/create.php
Original file line number Diff line number Diff line change
Expand Up @@ -255,15 +255,6 @@
}
else
{
if(setting('core.account_create_character_create')) {
// character creation
$character_created = $createCharacter->doCreate($character_name, $character_sex, $character_vocation, $character_town, $new_account, $errors);
if (!$character_created) {
error('There was an error creating your character. Please create your character later in account management page.');
error(implode(' ', $errors));
}
}

if(setting('core.account_create_auto_login')) {
if ($hasBeenCreatedByEMail) {
$_POST['account_login'] = $email;
Expand Down Expand Up @@ -314,6 +305,15 @@
}
}

if(setting('core.account_create_character_create')) {
// character creation
$character_created = $createCharacter->doCreate($character_name, $character_sex, $character_vocation, $character_town, $new_account, $errors);
if (!$character_created) {
error('There was an error creating your character. Please create your character later in account management page.');
error(implode(' ', $errors));
}
}

return;
}
}
Expand Down
2 changes: 1 addition & 1 deletion system/templates/account.create.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@

{{ hook('HOOK_ACCOUNT_CREATE_BETWEEN_BOXES_1') }}

{% if (not setting('core.mail_enabled') or not setting('core.account_mail_verify')) and setting('core.account_create_character_create') %}
{% if setting('core.account_create_character_create') %}
<tr>
<td>
<div class="TableShadowContainerRightTop">
Expand Down

0 comments on commit 203e411

Please sign in to comment.