From c49e4fd63d20e64ae33829b9fb8c98fe2ddb2338 Mon Sep 17 00:00:00 2001 From: slawkens Date: Thu, 16 Feb 2023 11:07:00 +0100 Subject: [PATCH] add hook for disable accounts edit for next.my-aac.org (security) --- admin/pages/accounts.php | 2 +- system/hooks.php | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/admin/pages/accounts.php b/admin/pages/accounts.php index f96d0ec2..8cdcc66d 100644 --- a/admin/pages/accounts.php +++ b/admin/pages/accounts.php @@ -150,7 +150,7 @@ else if (isset($_REQUEST['search'])) { $web_lastlogin = strtotime($_POST['web_lastlogin']); verify_number($web_lastlogin, 'Web Last login', 11); - if (!$error) { + if (!$error && $hooks->trigger(HOOK_ADMIN_ACCOUNTS_POST, ['account_id' => $account->getId(), 'account_email' => $account->getEMail()])) { if (USE_ACCOUNT_NAME) { $account->setName($name); } diff --git a/system/hooks.php b/system/hooks.php index 3c4629d9..54ec08a3 100644 --- a/system/hooks.php +++ b/system/hooks.php @@ -65,6 +65,7 @@ define('HOOK_ADMIN_MENU', ++$i); define('HOOK_ADMIN_LOGIN_AFTER_ACCOUNT', ++$i); define('HOOK_ADMIN_LOGIN_AFTER_PASSWORD', ++$i); define('HOOK_ADMIN_LOGIN_AFTER_SIGN_IN', ++$i); +define('HOOK_ADMIN_ACCOUNTS_POST', ++$i); define('HOOK_EMAIL_CONFIRMED', ++$i); define('HOOK_GUILDS_AFTER_INVITED_CHARACTERS', ++$i);