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

View file

@ -73,9 +73,9 @@ class Api {
} }
// Basic auth. // 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); $userdata = $this->CI->accounts->check_login($username, $password);