Skip to content

Commit

Permalink
Rename variable
Browse files Browse the repository at this point in the history
  • Loading branch information
alextselegidis committed Oct 9, 2023
1 parent 3aba05b commit cac3e63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions application/libraries/Api.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ public function auth(): void

$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');
}
Expand Down

0 comments on commit cac3e63

Please sign in to comment.