[wp-trac] [WordPress Trac] #57967: Regression: Username check introduced in WP 6.2 should allow updates to the same user

WordPress Trac noreply at wordpress.org
Wed Mar 22 00:11:37 UTC 2023


#57967: Regression: Username check introduced in WP 6.2 should allow updates to the
same user
-------------------------------------------------+-------------------------
 Reporter:  polevaultweb                         |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  accepted
 Priority:  normal                               |   Milestone:  6.2
Component:  Users                                |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing                                        |
-------------------------------------------------+-------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch needs-testing => has-patch has-unit-tests needs-
     testing


Old description:

> If you create a user with the username set as the email address, when you
> use `wp_update_user` to update the user's data, in WP 6.2 RC3 it will
> throw a 'existing_user_email_as_login' error due to the code introduced
> to fix https://core.trac.wordpress.org/ticket/57394.
>
> The code does not account for update calls to `wp_insert_user`, and if
> the function is called as part of an update it should check that the user
> being updated is different to the user found by the email search.

New description:

 If you create a user with the username set as the email address, when you
 use `wp_update_user` to update the user's data, in WP 6.2 RC3 it will
 throw a `'existing_user_email_as_login'` error due to the code introduced
 to fix #57394 / [55358] and [55360].

 The code does not account for update calls to `wp_insert_user`, and if the
 function is called as part of an update it should check that the user
 being updated is different to the user found by the email search.

--

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


More information about the wp-trac mailing list