If set use the SESSION username

This commit is contained in:
FusionPBX 2023-04-17 22:15:02 -06:00 committed by GitHub
parent edb65edeec
commit 1cebbb7c45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

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