[wp-trac] [WordPress Trac] #39544: REST API: Improve users endpoint in multisite

WordPress Trac noreply at wordpress.org
Mon Apr 17 09:04:43 UTC 2017


#39544: REST API: Improve users endpoint in multisite
----------------------------+-----------------------------
 Reporter:  flixos90        |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  REST API        |     Version:
 Severity:  normal          |  Resolution:
 Keywords:                  |     Focuses:  multisite
----------------------------+-----------------------------
Changes (by jnylen0):

 * keywords:  2nd-opinion =>


Comment:

 Replying to [comment:8 flixos90]:
 > Only regarding `POST wp/v2/users?global=true` I don't think we need
 something like `add_to_site` there. Calling `POST wp/v2/users` already
 creates a new user and adds them to the current site, so that that use-
 case is covered.
 > And since the `global` parameter should indicate a global operation, I
 think it's sufficient to only create the user under that circumstances.
 Adding a user to a site is an operation in the site context, so I think it
 should not happen when passing `global`.
 After some further reflection I agree with this:  creating a user globally
 doesn't imply adding them to a specific site.

 > `POST wp/v2/users?email=<existing-email-address>` adds an existing user
 to the current site

 For this particular case, it may be better to add a separate endpoint.
 However, this still seems like a fairly uncommon use case compared to
 other user management tasks and should be fine to be addressed later on.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39544#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list