[wp-trac] [WordPress Trac] #64657: Add `core/get-user` ability

WordPress Trac noreply at wordpress.org
Tue Feb 17 16:43:40 UTC 2026


#64657: Add `core/get-user` ability
------------------------------+----------------------------
 Reporter:  jorgefilipecosta  |      Owner:  (none)
     Type:  defect (bug)      |     Status:  new
 Priority:  normal            |  Milestone:  Future Release
Component:  AI                |    Version:  trunk
 Severity:  normal            |   Keywords:
  Focuses:                    |
------------------------------+----------------------------
 Introduce a new Abilities API ability, `core/get-user`, to retrieve
 profile data for a specific user by `id`, `username`, or `email`.

 Core currently has `core/get-user-info` for the current authenticated user
 only (and not exposed in REST). Agent/workflows use cases need to be able
 to look up any user when permissions allow it.

 == Proposed behavior ==
 * Register `core/get-user` in the `user` ability category.
 * Input schema:
   * Require one of: `id` (integer), `username` (string), or `email`
 (string).
   * Optional: `include_capabilities` (boolean, default `false`).
 * Output schema includes:
   * `id`, `username`, `email`, `display_name`, `first_name`, `last_name`,
 `nickname`, `description`, `url`, `link`, `slug`, `registered_date`,
 `roles`, `locale`, `avatar_urls`.
   * Optional `capabilities` when `include_capabilities` is true.
 * Permission model:
   * User must be logged in.
   * Users can view their own record.
   * Viewing other users requires `list_users`.
 * Expose the ability in REST (`show_in_rest` true).
 * Return `user_not_found` error when no matching user exists.

 == Notes / follow-ups ==
 * This ticket scopes the initial profile payload.
 * Follow-up can extend response data (for example, registered user meta
 with schema).


 == References ==
 * https://github.com/WordPress/wordpress-develop/pull/10775
 * https://github.com/WordPress/ai/issues/40

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/64657>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list