Skip to content

Commit

Permalink
Merge pull request WP-API#8 from WP-API/return-correct-values
Browse files Browse the repository at this point in the history
Return the correct values from filters
  • Loading branch information
rmccue committed Jul 7, 2014
2 parents 0fe1c55 + d8df514 commit 96b67a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions basic-auth.php
Original file line number Diff line number Diff line change
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

0 comments on commit 96b67a2

Please sign in to comment.