diff --git a/core/authentication/resources/classes/authentication.php b/core/authentication/resources/classes/authentication.php index c5d8844a42..3f6e496062 100644 --- a/core/authentication/resources/classes/authentication.php +++ b/core/authentication/resources/classes/authentication.php @@ -40,7 +40,7 @@ class authentication { } //set the default authentication method to the database - if (!is_array($_SESSION['authentication']['methods'])) { + if (empty($_SESSION['authentication']['methods']) || !is_array($_SESSION['authentication']['methods'])) { $_SESSION['authentication']['methods'][] = 'database'; } @@ -53,7 +53,7 @@ class authentication { foreach ($_SESSION['authentication']['methods'] as $name) { //already processed the plugin move to the next plugin - if (!empty($_SESSION['authentication']['plugin']) && $_SESSION['authentication']['plugin'][$name]['authorized']) { + if (!empty($_SESSION['authentication']['plugin']) && !empty($_SESSION['authentication']['plugin'][$name]) && $_SESSION['authentication']['plugin'][$name]['authorized']) { continue; } @@ -468,4 +468,4 @@ $response = $auth->validate(); print_r($response); */ -?> +?> \ No newline at end of file diff --git a/core/authentication/resources/classes/plugins/email.php b/core/authentication/resources/classes/plugins/email.php index 54f31a1688..ae65c13c0e 100644 --- a/core/authentication/resources/classes/plugins/email.php +++ b/core/authentication/resources/classes/plugins/email.php @@ -75,6 +75,7 @@ class plugin_email { $view->assign("login_logo_height", $settings['theme']['login_logo_height']); $view->assign("login_logo_source", $settings['theme']['logo']); $view->assign("button_login", $text['button-login']); + $view->assign("button_cancel", $text['button-cancel']); //show the views $content = $view->render('username.htm'); @@ -255,6 +256,7 @@ class plugin_email { $view->assign("login_logo_height", $settings['theme']['login_logo_height']); $view->assign("login_logo_source", $settings['theme']['logo']); $view->assign("button_verify", $text['label-verify']); + $view->assign("button_cancel", $text['button-cancel']); //debug information //echo "
\n";
@@ -391,4 +393,4 @@ class plugin_email {
 	}
 }
 
-?>
+?>
\ No newline at end of file
diff --git a/core/authentication/resources/classes/plugins/totp.php b/core/authentication/resources/classes/plugins/totp.php
index 5f32e837df..090204c15d 100644
--- a/core/authentication/resources/classes/plugins/totp.php
+++ b/core/authentication/resources/classes/plugins/totp.php
@@ -81,6 +81,7 @@ class plugin_totp {
 				$view->assign("login_logo_height", $settings['theme']['login_logo_height']);
 				$view->assign("login_logo_source", $settings['theme']['logo']);
 				$view->assign("button_login", $text['button-login']);
+				$view->assign("button_cancel", $text['button-cancel']);
 				$view->assign("favicon", $settings['theme']['favicon']);
 
 				//show the views
@@ -114,7 +115,7 @@ class plugin_totp {
 				$sql .= "	username = :username\n";
 				$sql .= "	or user_email = :username\n";
 				$sql .= ")\n";
-				if ($_SESSION["users"]["unique"]["text"] != "global") {
+				if (empty($_SESSION["users"]["unique"]["text"]) || $_SESSION["users"]["unique"]["text"] != "global") {
 					//unique username per domain (not globally unique across system - example: email address)
 					$sql .= "and domain_uuid = :domain_uuid ";
 					$parameters['domain_uuid'] = $this->domain_uuid;
@@ -164,6 +165,7 @@ class plugin_totp {
 				$view->init();
 
 				//assign values to the template
+				$view->assign("project_path", PROJECT_PATH);
 				$view->assign("login_destination_url", $settings['login']['destination']);
 				$view->assign("favicon", $settings['theme']['favicon']);
 				$view->assign("login_title", $text['label-verify']);
@@ -172,6 +174,7 @@ class plugin_totp {
 				$view->assign("login_logo_height", $settings['theme']['login_logo_height']);
 				$view->assign("login_logo_source", $settings['theme']['logo']);
 				$view->assign("favicon", $settings['theme']['favicon']);
+				$view->assign("button_cancel", $text['button-cancel']);
 
 				//show the views
 				if ($_SESSION['authentication']['plugin']['database']['authorized'] && empty($this->user_totp_secret)) {
@@ -362,4 +365,4 @@ class plugin_totp {
 	}
 }
 
-?>
+?>
\ No newline at end of file
diff --git a/core/authentication/resources/views/email.htm b/core/authentication/resources/views/email.htm
index dd8be1cd94..27d376c82b 100644
--- a/core/authentication/resources/views/email.htm
+++ b/core/authentication/resources/views/email.htm
@@ -12,18 +12,21 @@
 	
 		
+
-
+
+ - + \ No newline at end of file diff --git a/core/authentication/resources/views/login.htm b/core/authentication/resources/views/login.htm index 9c60b818e4..bc5ceee343 100644 --- a/core/authentication/resources/views/login.htm +++ b/core/authentication/resources/views/login.htm @@ -74,5 +74,6 @@
+ - + \ No newline at end of file diff --git a/core/authentication/resources/views/totp.htm b/core/authentication/resources/views/totp.htm index 295298706c..5caa073b24 100644 --- a/core/authentication/resources/views/totp.htm +++ b/core/authentication/resources/views/totp.htm @@ -15,14 +15,16 @@
- -

+
- + +

+
+ - + \ No newline at end of file diff --git a/core/authentication/resources/views/totp_secret.htm b/core/authentication/resources/views/totp_secret.htm index 77f123dbc5..2aa1576ab2 100644 --- a/core/authentication/resources/views/totp_secret.htm +++ b/core/authentication/resources/views/totp_secret.htm @@ -12,18 +12,18 @@
-
+
-
- {$totp_secret}

-

+
- +
- + \ No newline at end of file diff --git a/core/authentication/resources/views/username.htm b/core/authentication/resources/views/username.htm index 561ed7d4e5..197deea4ca 100644 --- a/core/authentication/resources/views/username.htm +++ b/core/authentication/resources/views/username.htm @@ -19,9 +19,12 @@
+

+
+ - + \ No newline at end of file diff --git a/themes/default/css.php b/themes/default/css.php index 7d29b749fa..f574f83bd8 100644 --- a/themes/default/css.php +++ b/themes/default/css.php @@ -136,6 +136,9 @@ $input_shadow_outer_color_focus = isset($_SESSION['theme']['input_shadow_outer_c $input_border_radius = $_SESSION['theme']['input_border_radius']['text'] ?? null; $input_border_color_hover = $_SESSION['theme']['input_border_color_hover']['text'] ?? '#c0c0c0'; $input_border_color_focus = $_SESSION['theme']['input_border_color_focus']['text'] ?? '#c0c0c0'; +$login_text_color = $_SESSION['theme']['login_text_color']['text'] ?? '#888888'; +$login_text_size = $_SESSION['theme']['login_text_size']['text'] ?? '12px'; +$login_text_font = $_SESSION['theme']['login_text_font']['text'] ?? 'Arial'; $login_input_text_font = $_SESSION['theme']['login_input_text_font']['text'] ?? $input_text_font; $login_input_text_size = $_SESSION['theme']['login_input_text_size']['text'] ?? $input_text_size; $login_input_text_color = $_SESSION['theme']['login_input_text_color']['text'] ?? $input_text_color; @@ -1455,6 +1458,13 @@ else { //default: white text-decoration: none; } + .login_text { + color: !important; + font-size: ; + font-family: ; + text-decoration: none; + } +