forked from mirrors/easyappointments
Rename variable
This commit is contained in:
parent
3aba05bd28
commit
cac3e6317d
1 changed files with 2 additions and 2 deletions
|
@ -79,9 +79,9 @@ class Api {
|
||||||
|
|
||||||
$password = $_SERVER['PHP_AUTH_PW'] ?? NULL;
|
$password = $_SERVER['PHP_AUTH_PW'] ?? NULL;
|
||||||
|
|
||||||
$userdata = $this->CI->accounts->check_login($username, $password);
|
$user_data = $this->CI->accounts->check_login($username, $password);
|
||||||
|
|
||||||
if (empty($userdata['role_slug']) || $userdata['role_slug'] !== DB_SLUG_ADMIN)
|
if (empty($user_data['role_slug']) || $user_data['role_slug'] !== DB_SLUG_ADMIN)
|
||||||
{
|
{
|
||||||
throw new RuntimeException('The provided credentials do not match any admin user!', 401, 'Unauthorized');
|
throw new RuntimeException('The provided credentials do not match any admin user!', 401, 'Unauthorized');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue