diff --git a/includes/class-endpoint.php b/includes/class-endpoint.php index 208d60e..5da75e8 100644 --- a/includes/class-endpoint.php +++ b/includes/class-endpoint.php @@ -56,11 +56,11 @@ public function authenticate() { $creds = array(); // Allow the usage of the standard basic auth pattern if ( isset( $_SERVER['PHP_AUTH_USER'] ) ) { - $creds['user_login'] = $_SERVER['PHP_AUTH_USER']; - $creds['user_password'] = $_SERVER['PHP_AUTH_PW']; - } else { - $creds['user_login'] = $_SERVER['HTTP_USER']; - $creds['user_password'] = $_SERVER['HTTP_PASSWORD']; + $creds['user_login'] = $_SERVER['PHP_AUTH_USER']; + $creds['user_password'] = $_SERVER['PHP_AUTH_PW']; + } else { + $creds['user_login'] = $_SERVER['HTTP_USER']; + $creds['user_password'] = $_SERVER['HTTP_PASSWORD']; } $creds['remember'] = false; $user = wp_signon($creds, false);