[wp-trac] [WordPress Trac] #57394: wp_insert_user allows the new user to have a username equal to an already registered email

WordPress Trac noreply at wordpress.org
Thu Mar 23 14:17:55 UTC 2023


#57394: wp_insert_user allows the new user to have a username equal to an already
registered email
-------------------------------------------------+-------------------------
 Reporter:  buutqn                               |       Owner:  audrasjb
     Type:  defect (bug)                         |      Status:  assigned
 Priority:  normal                               |   Milestone:  6.2
Component:  Login and Registration               |     Version:  6.1.1
 Severity:  normal                               |  Resolution:
 Keywords:  revert has-patch has-unit-tests      |     Focuses:
  dev-reviewed                                   |
-------------------------------------------------+-------------------------

Comment (by audrasjb):

 In [changeset:"55585" 55585]:
 {{{
 #!CommitTicketReference repository="" revision="55585"
 Login and Registration: Revert [55358] and [55360].

 This reverts the changes implemented in [55358] and [55360].

 Changeset [55358] was committed to prevent login name collision when one
 user registers with the email address `user at example.com` and a second user
 tries to register with the username `user at example.com`. However, it also
 introduced a potential backward compatibility issues for plugins that use
 `wp_update_user()`. When updating an existing user, it throws an
 `existing_user_email_as_login` error if the email address is also used for
 the user login, due to the code introduced in [55358].

 This changeset removes the new scenario added in [55358] and [55360],
 restoring the `wp_insert_user()` function back to its previous state.

 Props polevaultweb, audrasjb, costdev, peterwilsoncc, hellofromTonya,
 SergeyBiryukov, azaozz.
 Reviewed by hellofromTonya.
 Merges [55584] to the 6.2 branch.
 See #57967, #57394.
 }}}

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


More information about the wp-trac mailing list