From 4c3f0124bc5e318920b6945abde967565021f897 Mon Sep 17 00:00:00 2001 From: romanlesnikov Date: Wed, 13 Nov 2024 10:05:55 +0200 Subject: [PATCH] #4558 - Build-in API support (forgot pass page for logged) --- modules/boonex/english/data/langs/system/en.xml | 1 + template/scripts/BxBaseServiceAccount.php | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/modules/boonex/english/data/langs/system/en.xml b/modules/boonex/english/data/langs/system/en.xml index 1547f54e3d..350a997a29 100644 --- a/modules/boonex/english/data/langs/system/en.xml +++ b/modules/boonex/english/data/langs/system/en.xml @@ -3962,6 +3962,7 @@ If it is not enabled then please consider implement this optimization, since it + diff --git a/template/scripts/BxBaseServiceAccount.php b/template/scripts/BxBaseServiceAccount.php index 5e5ab424fe..217af312a0 100644 --- a/template/scripts/BxBaseServiceAccount.php +++ b/template/scripts/BxBaseServiceAccount.php @@ -591,6 +591,12 @@ public function serviceGetOptionsPruningInterval() public function serviceForgotPassword() { if(isLogged()){ + $bApi = bx_is_api(); + if($bApi) { + return [ + bx_api_get_msg(_t("_sys_txt_forgot_pasword_logged_in"), ['ext' => ['msg_type' => 'result']]), + ]; + } header('Location: ' . BX_DOL_URL_ROOT); exit; }