WordPress/wp-includes/rest-api/endpoints
desrosj 56bb62543d REST API: Allow a user to change the letter casing of their email.
When a `PUT` request is performed to update a user, a `rest_user_invalid_email` error is incorrectly being returned when the email exists with different letter casing, even if it belongs to the user being updated. `email_exists()` performs a case insensitive lookup, but the conditional statement following that lookup was performing a strict comparison between the new email and the user’s current email.

This changes that comparison to instead compare the user ID returned by `email_exists()` with the user ID being updated. This more closely matches the logic used in `edit_user()` and allows a user to change the letter casing of their email.

Props fuchsws, rachelbaker, desrosj.
Fixes #44672.
Built from https://develop.svn.wordpress.org/trunk@44641


git-svn-id: http://core.svn.wordpress.org/trunk@44472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-17 21:25:51 +00:00
..
class-wp-rest-attachments-controller.php REST API: Remove a duplicate `require_once()`. 2018-12-19 03:27:26 +00:00
class-wp-rest-autosaves-controller.php REST API: Avoid using 'parent' as path argument name for autosaves. 2018-12-17 03:26:22 +00:00
class-wp-rest-block-renderer-controller.php REST API: Preserve unknown, respect `null` in server-side block rendering. 2018-12-17 18:00:52 +00:00
class-wp-rest-blocks-controller.php REST API: Always include `title.raw`/`content.raw` for Blocks in `context=view`. 2018-12-17 17:22:52 +00:00
class-wp-rest-comments-controller.php REST API: Fire actions after items are completely updated/inserted. 2018-12-12 21:12:24 +00:00
class-wp-rest-controller.php General: Fix problematic string to array parsing. 2019-01-10 21:06:49 +00:00
class-wp-rest-post-statuses-controller.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:51:36 +00:00
class-wp-rest-post-types-controller.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:51:36 +00:00
class-wp-rest-posts-controller.php REST API: Prevent duplicate firing of `rest(_after)?_insert_attachment` actions. 2018-12-17 03:05:20 +00:00
class-wp-rest-revisions-controller.php REST API: Support pagination, order, search and other common query parameters for revisions. 2018-08-28 12:23:26 +00:00
class-wp-rest-search-controller.php REST API: Introduce controller for searching across post types. 2018-12-13 09:38:25 +00:00
class-wp-rest-settings-controller.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:51:36 +00:00
class-wp-rest-taxonomies-controller.php Coding Standards: Upgrade WPCS to 1.0.0 2018-08-17 01:51:36 +00:00
class-wp-rest-terms-controller.php REST API: Fire actions after items are completely updated/inserted. 2018-12-12 21:12:24 +00:00
class-wp-rest-themes-controller.php Themes: Introduce responsive embeds support. 2018-12-14 01:50:37 +00:00
class-wp-rest-users-controller.php REST API: Allow a user to change the letter casing of their email. 2019-01-17 21:25:51 +00:00