Browse Source

If set use the SESSION username

FusionPBX 2 years ago
parent
commit
3c70f03e11
1 changed files with 6 additions and 1 deletions
  1. 6 1
      core/authentication/resources/classes/plugins/database.php

+ 6 - 1
core/authentication/resources/classes/plugins/database.php

@@ -127,10 +127,15 @@ class plugin_database {
 			//}
 			//}
 
 
 		//add the authentication details
 		//add the authentication details
-			if (isset($_REQUEST["username"]) && isset($_REQUEST["password"])) {
+			if (isset($_REQUEST["username"])) {
 				$this->username = $_REQUEST["username"];
 				$this->username = $_REQUEST["username"];
+			}
+			if (isset($_REQUEST["password"])) {
 				$this->password = $_REQUEST["password"];
 				$this->password = $_REQUEST["password"];
 			}
 			}
+			if (isset($_SESSION['username'])) {
+				$this->username = $_SESSION['username'];
+			}
 			if (isset($_REQUEST["key"])) {
 			if (isset($_REQUEST["key"])) {
 				$this->key = $_REQUEST["key"];
 				$this->key = $_REQUEST["key"];
 			}
 			}