Parcourir la source

Authentication - TOTP: Updatse for PHP 8.1

fusionate il y a 2 ans
Parent
commit
5a5b4f6872
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      core/authentication/resources/classes/plugins/totp.php

+ 1 - 1
core/authentication/resources/classes/plugins/totp.php

@@ -177,7 +177,7 @@ class plugin_totp {
 				$view->assign("button_cancel", $text['button-cancel']);
 
 				//show the views
-				if ($_SESSION['authentication']['plugin']['database']['authorized'] && empty($this->user_totp_secret)) {
+				if (!empty($_SESSION['authentication']['plugin']['database']['authorized']) && empty($this->user_totp_secret)) {
 
 					//create the totp secret
 					$base32 = new base2n(5, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ234567', FALSE, TRUE, TRUE);