Skip to content
This repository has been archived by the owner on Sep 24, 2018. It is now read-only.

The response from creating or updating a User should pass context = edit #661

Closed
rachelbaker opened this issue Nov 28, 2014 · 0 comments · Fixed by #664
Closed

The response from creating or updating a User should pass context = edit #661

rachelbaker opened this issue Nov 28, 2014 · 0 comments · Fixed by #664
Assignees
Labels
Milestone

Comments

@rachelbaker
Copy link
Member

When returning the User response from WP_JSON_Users_Controller->create_item() or WP_JSON_Users_Controller->update_item() the edit context should be passed.

This:

$response = $this->get_item( array( 'id' => $user_id ) );

Becomes:

$response = $this->get_item( array( 
    'id' => $user_id,
    'context' => 'edit',
 ) );
@rachelbaker rachelbaker self-assigned this Nov 28, 2014
@rachelbaker rachelbaker added this to the 2.0 milestone Nov 28, 2014
rachelbaker added a commit that referenced this issue Nov 30, 2014
rachelbaker added a commit that referenced this issue Nov 30, 2014
Pass the edit context when returning the create or update response. Fixes #661
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant