Add default values to the authentication parameters

This commit is contained in:
Alex Tselegidis 2023-01-23 07:45:40 +01:00
parent f8925ddb0d
commit 07b628324d
1 changed files with 2 additions and 2 deletions

View File

@ -73,9 +73,9 @@ class Api {
}
// Basic auth.
$username = $_SERVER['PHP_AUTH_USER'];
$username = $_SERVER['PHP_AUTH_USER'] ?? NULL;
$password = $_SERVER['PHP_AUTH_PW'];
$password = $_SERVER['PHP_AUTH_PW'] ?? NULL;
$userdata = $this->CI->accounts->check_login($username, $password);