wp_user_query not working fine
-
if(email_exists( $email )){ echo 'Email exits: ' . $email; $args2 = array( 'user_email' => $email, ); $query = new WP_User_Query($args2); if ( !empty( $query->results ) ) { foreach ( $query->results as $user2 ){ $user_id = $user2->ID; echo 'User ID: ' . $user_id; } } else { echo 'User not found'; } }
the above code is echoing all the id in the wp_users table
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘wp_user_query not working fine’ is closed to new replies.