[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
Mon Oct 16 18:01:01 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.4
Component:  Login and Registration               |     Version:  6.1.1
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-      |     Focuses:
  testing commit                                 |
-------------------------------------------------+-------------------------

Comment (by ironprogrammer):

 == Test Report

 Patch tested: https://github.com/WordPress/wordpress-develop/pull/5032
 👍🏻

 === Environment
 - Hardware: MacBook Pro Apple M1 Pro
 - OS: macOS 13.6
 - Browser: Safari 16.6
 - Server: nginx/1.25.2
 - PHP: 8.2.11
 - WordPress: 6.4-alpha-56267-src
 - Theme: twentytwentythree v1.2

 === Actual Results
 - ✅ Unable to create a new user (`/wp-admin/user-new.php`) with a
 username that matches an existing user's email. An error error message is
 returned (Figure 1).
 - ✅ Unable to register a new user (`/wp-login.php?action=register`) with
 a username that matches an existing user's email. An error error message
 is returned (Figure 2).

 === Supplemental Artifacts
 ''Figure 1: New User result if username `admin` with email
 `admin at example.com` already exists.''
   [[Image(https://cldup.com/5gpLMhTUrQ.png, 600px)]]

 ''Figure 2: Registration result if username `admin` with email
 `admin at example.com` already exists.''
   [[Image(https://cldup.com/MjRTn9X4k8.png, 300px)]]

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


More information about the wp-trac mailing list