Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return the correct values from filters #8

Merged
merged 1 commit into from Jul 7, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions basic-auth.php
Expand Up @@ -16,7 +16,7 @@ function json_basic_auth_handler( $user ) {

// Check that we're trying to authenticate
if ( !isset( $_SERVER['PHP_AUTH_USER'] ) ) {
return false;
return $user;
}

$username = $_SERVER['PHP_AUTH_USER'];
Expand All @@ -43,9 +43,9 @@ function json_basic_auth_error( $error ) {

global $wp_json_basic_auth_error;

// If we don't have an error, passthrough the null
// If we don't have an error, we're good!
if ( empty( $wp_json_basic_auth_error ) ) {
return $error;
return true;
}

// We have an error! Return it.
Expand Down