From ffb8f0879b98554b430e06853538272d4acfc643 Mon Sep 17 00:00:00 2001 From: slawkens Date: Sun, 8 Sep 2024 15:03:45 +0200 Subject: [PATCH] two hooks for compatibility --- system/hooks.php | 1 + system/pages/createaccount.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/system/hooks.php b/system/hooks.php index df63d68d..9784f081 100644 --- a/system/hooks.php +++ b/system/hooks.php @@ -48,6 +48,7 @@ define('HOOK_ACCOUNT_CREATE_AFTER_VOCATION', ++$i); define('HOOK_ACCOUNT_CREATE_AFTER_TOWNS', ++$i); define('HOOK_ACCOUNT_CREATE_BEFORE_SUBMIT_BUTTON', ++$i); define('HOOK_ACCOUNT_CREATE_AFTER_FORM', ++$i); +define('HOOK_ACCOUNT_CREATE_POST', ++$i); define('HOOK_ACCOUNT_CREATE_AFTER_SUBMIT', ++$i); define('HOOK_ACCOUNT_CREATE_AFTER_SAVED', ++$i); define('HOOK_ACCOUNT_MANAGE_BEFORE_GENERAL_INFORMATION', ++$i); diff --git a/system/pages/createaccount.php b/system/pages/createaccount.php index 1e177e75..8a75cbe5 100644 --- a/system/pages/createaccount.php +++ b/system/pages/createaccount.php @@ -137,7 +137,13 @@ if($save) $params['account_id'] = $_POST['account']; } + /** + * two hooks for compatibility + */ $hooks->trigger(HOOK_ACCOUNT_CREATE_AFTER_SUBMIT, $params); + if (!$hooks->trigger(HOOK_ACCOUNT_CREATE_POST, $params)) { + return; + } if(config('account_create_character_create')) { $character_name = isset($_POST['name']) ? stripslashes(ucwords(strtolower($_POST['name']))) : null;