Skip to content

Commit

Permalink
Merge pull request #120 from r-a-y/fix/meta-compare-exists
Browse files Browse the repository at this point in the history
SSO: When fetching the user, use 'EXISTS' for 'meta_compare' argument.
  • Loading branch information
tomjn authored Aug 22, 2023
2 parents 59098bd + a98786b commit f8aeab9
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions sso.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,11 +504,7 @@ function handle_login_response() {
// Fetch using the token
$users = get_users( array(
'meta_key' => 'mercator_sso_' . $args['key'],

// Check that the value exists (WP doesn't support EXISTS, so use a
// dummy value that will never match)
'meta_value' => 'dummy_value',
'meta_compare' => '!=',
'meta_compare' => 'EXISTS',

// Skip capability check
'blog_id' => 0,
Expand Down

0 comments on commit f8aeab9

Please sign in to comment.