Title: <abbr title="Not Safe For Work / Mature content">[NSFW]</abbr> user api
Last modified: February 6, 2023

---

# [NSFW] user api

 *  Resolved [wasef201](https://wordpress.org/support/users/wasef201/)
 * (@wasef201)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/user-api/)
 * Members registered through the private form in addition do not appear in the 
   api
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fuser-api%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [andrewshu](https://wordpress.org/support/users/andrewshu/)
 * (@andrewshu)
 * [3 years, 4 months ago](https://wordpress.org/support/topic/user-api/#post-16455621)
 * Hello [@wasef201](https://wordpress.org/support/users/wasef201/)
 * Sorry for the late answer. This is not UM issue, this is the WordPress restrictions.
    1. Make sure you are authenticated and your users have the `list_users` capability.
    2. By default, only users who have published posts are returned by the request.
       To disable this, you can remove _has\_published\_posts_ from the query args,
       please see the hook:
 *     ```wp-block-code
       add_filter('rest_user_query', 'remove_has_published_posts_from_api_user_query', 10, 2);
       function remove_has_published_posts_from_api_user_query($prepared_args, $request)
       {
           unset($prepared_args['has_published_posts']);
   
           return $prepared_args;
       }
       ```
   
 * Thank you.
 *  Plugin Support [andrewshu](https://wordpress.org/support/users/andrewshu/)
 * (@andrewshu)
 * [3 years, 3 months ago](https://wordpress.org/support/topic/user-api/#post-16468459)
 * Hi [@wasef201](https://wordpress.org/support/users/wasef201/)
 * This thread has been inactive for a while so we’re going to go ahead and mark
   it Resolved.
 * Please feel free to re-open this thread if any other questions come up and we’d
   be happy to help. 🙂
 * Regards

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[NSFW] user api’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-member/assets/icon-256x256.png?rev=3160947)
 * [Ultimate Member – User Profile, Registration, Login, Member Directory, Content Restriction & Membership Plugin](https://wordpress.org/plugins/ultimate-member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-member/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-member/reviews/)

## Tags

 * [api](https://wordpress.org/support/topic-tag/api/)

 * 2 replies
 * 2 participants
 * Last reply from: [andrewshu](https://wordpress.org/support/users/andrewshu/)
 * Last activity: [3 years, 3 months ago](https://wordpress.org/support/topic/user-api/#post-16468459)
 * Status: resolved