[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
Fri Dec 30 16:41:24 UTC 2022


#57394: wp_insert_user allows the new user to have a username equal to an already
registered email
------------------------------------+------------------------------
 Reporter:  buutqn                  |       Owner:  (none)
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Login and Registration  |     Version:  6.1.1
 Severity:  normal                  |  Resolution:
 Keywords:  needs-patch             |     Focuses:
------------------------------------+------------------------------

Comment (by dunhakdis):

 I was able to reproduce the same behaviour. I think it should throw a
 WP_Error if the supplied username already exists as an email of an
 existing user.

 The same behaviour can be reproduced with wp-login.php?action=register
 form.

 Added a patch.

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


More information about the wp-trac mailing list