From 54565ede4176fc169cf0a0784312a8c3a5cc2bfc Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 5 Sep 2024 10:28:53 -0600 Subject: [PATCH] Fix a bug where logo was overridden --- .../resources/classes/plugins/email.php | 16 +++------------- .../resources/classes/plugins/totp.php | 10 ---------- 2 files changed, 3 insertions(+), 23 deletions(-) diff --git a/core/authentication/resources/classes/plugins/email.php b/core/authentication/resources/classes/plugins/email.php index 40754f7066..ad14d65d01 100644 --- a/core/authentication/resources/classes/plugins/email.php +++ b/core/authentication/resources/classes/plugins/email.php @@ -49,7 +49,7 @@ class plugin_email { */ function email() { - //pre-process some settings + //pre-process some settings $settings['theme']['favicon'] = !empty($_SESSION['theme']['favicon']['text']) ? $_SESSION['theme']['favicon']['text'] : PROJECT_PATH.'/themes/default/favicon.ico'; $settings['login']['destination'] = !empty($_SESSION['login']['destination']['text']) ? $_SESSION['login']['destination']['text'] : ''; $settings['users']['unique'] = !empty($_SESSION['users']['unique']['text']) ? $_SESSION['users']['unique']['text'] : ''; @@ -59,16 +59,11 @@ class plugin_email { $settings['theme']['message_delay'] = isset($_SESSION['theme']['message_delay']) ? 1000 * (float) $_SESSION['theme']['message_delay'] : 3000; $settings['theme']['background_video'] = isset($_SESSION['theme']['background_video'][0]) ? $_SESSION['theme']['background_video'][0] : null; - //set a default template - $_SESSION['domain']['template']['name'] = 'default'; - $_SESSION['theme']['menu_brand_image']['text'] = PROJECT_PATH.'/themes/default/images/logo.png'; - $_SESSION['theme']['menu_brand_type']['text'] = 'image'; - - //get the domain + //get the domain $domain_array = explode(":", $_SERVER["HTTP_HOST"]); $domain_name = $domain_array[0]; - //use the session username + //use the session username if (isset($_SESSION['username'])) { $_POST['username'] = $_SESSION['username']; $_REQUEST['username'] = $_SESSION['username']; @@ -311,11 +306,6 @@ class plugin_email { //echo $email_response."
\n"; //echo $email_error."
\n"; - //set a default template - $_SESSION['domain']['template']['name'] = 'default'; - $_SESSION['theme']['menu_brand_image']['text'] = PROJECT_PATH.'/themes/default/images/logo.png'; - $_SESSION['theme']['menu_brand_type']['text'] = 'image'; - //get the domain $domain_array = explode(":", $_SERVER["HTTP_HOST"]); $domain_name = $domain_array[0]; diff --git a/core/authentication/resources/classes/plugins/totp.php b/core/authentication/resources/classes/plugins/totp.php index d12132d1ad..d170355df0 100644 --- a/core/authentication/resources/classes/plugins/totp.php +++ b/core/authentication/resources/classes/plugins/totp.php @@ -71,11 +71,6 @@ class plugin_totp { //request the username if (!$this->username && !isset($_POST['authentication_code'])) { - //set a default template - $_SESSION['domain']['template']['name'] = 'default'; - $_SESSION['theme']['menu_brand_image']['text'] = PROJECT_PATH.'/themes/default/images/logo.png'; - $_SESSION['theme']['menu_brand_type']['text'] = 'image'; - //get the domain $domain_array = explode(":", $_SERVER["HTTP_HOST"]); $domain_name = $domain_array[0]; @@ -178,11 +173,6 @@ class plugin_totp { $_SESSION["user_email"] = $row['user_email']; $_SESSION["contact_uuid"] = $row["contact_uuid"]; - //set a default template - $_SESSION['domain']['template']['name'] = 'default'; - $_SESSION['theme']['menu_brand_image']['text'] = PROJECT_PATH.'/themes/default/images/logo.png'; - $_SESSION['theme']['menu_brand_type']['text'] = 'image'; - //get the domain $domain_array = explode(":", $_SERVER["HTTP_HOST"]); $domain_name = $domain_array[0];