From ab73d60c61e14a1cacdb6cfbf7f89f4bf3be0833 Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 12 Aug 2024 23:01:45 +0200 Subject: [PATCH] Fix warning if core.account_country is disabled --- admin/pages/accounts.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/admin/pages/accounts.php b/admin/pages/accounts.php index a25d50c5..377cac39 100644 --- a/admin/pages/accounts.php +++ b/admin/pages/accounts.php @@ -157,7 +157,9 @@ else if (isset($_REQUEST['search'])) { $rl_loca = $_POST['rl_loca']; //country - $rl_country = $_POST['rl_country']; + if(setting('core.account_country')) { + $rl_country = $_POST['rl_country']; + } $web_flags = $_POST['web_flags']; verify_number($web_flags, 'Web Flags', 1); @@ -204,7 +206,11 @@ else if (isset($_REQUEST['search'])) { } $account->setRLName($rl_name); $account->setLocation($rl_loca); - $account->setCountry($rl_country); + + if(setting('core.account_country')) { + $account->setCountry($rl_country); + } + $account->setCustomField('created', $created); $account->setWebFlags($web_flags); $account->setCustomField('web_lastlogin', $web_lastlogin);