diff --git a/src/wp-rest-api-auth0.php b/src/wp-rest-api-auth0.php index b035173..f44f65f 100644 --- a/src/wp-rest-api-auth0.php +++ b/src/wp-rest-api-auth0.php @@ -20,6 +20,7 @@ * @return int|null */ function determine_current_user( $user ) { + global $wpdb; // Only checked, not saved or output anywhere. // phpcs:ignore WordPress.Security.ValidatedSanitizedInput @@ -69,7 +70,7 @@ function determine_current_user( $user ) { $wp_user = current( get_users( array( - 'meta_key' => 'wp_auth0_id', + 'meta_key' => $wpdb->prefix . 'auth0_id', 'meta_value' => $decoded_token['sub'], ) )