[wp-trac] [WordPress Trac] #52976: user emails comparison should be case insensitive

WordPress Trac noreply at wordpress.org
Tue Jan 20 14:03:09 UTC 2026


#52976: user emails comparison should be case insensitive
-------------------------------------------------+-------------------------
 Reporter:  asaifm                               |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  Users                                |     Version:  4.3
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch has-        |     Focuses:
  screenshots                                    |
-------------------------------------------------+-------------------------
Changes (by ozgursar):

 * keywords:  good-first-bug has-patch needs-testing => good-first-bug has-
     patch has-screenshots


Comment:

 == Reproduction Report
 === Description
 This report validates whether the issue can be reproduced.

 === Environment
 - WordPress: 7.0-alpha-61500
 - PHP: 8.3.30
 - Server: PHP.wasm
 - Database: WP_SQLite_Driver (Server: 8.0.38 / Client: 3.51.0)
 - Browser: Chrome 143.0.0.0
 - OS: macOS
 - Theme: Twenty Twenty-One 2.7
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.1

 === Steps to Reproduce
 Use playground:
 https://playground.wordpress.net/?php=8.3&wp=trunk&networking=yes

 Method1 - Manually
 1. WordPress dashboard > Users > View your user email (e.g.
 admin at localhost.com)
 2. Click username and change email to ADMIN at localhost.com
 3. Profile updates but no notification is triggered. Email is visible with
 the uppercase version.
 4. Change it to a different email such as user at localhost.com and
 notification is triggered.

 Method2 - Programmatically
 1. Install any classic theme
 2. Add the following code to functions.php

 {{{
 // Get a test user
 $user_id = 1;
 $user = get_userdata($user_id);
 $original_email = $user->user_email; // e.g., "admin at localhost.com"

 // Update with same email but different case
 $result = wp_update_user([
     'ID' => $user_id,
     'user_email' => strtoupper($original_email) // "ADMIN at LOCALHOST.COM"
 ]);
 }}}

 3. Visit Users page and check the user email.
 4. Email is updated but no notification is triggered.


 === Actual Results
 1. ❌ Email notification is not triggered with the uppercase version.

 === Supplemental Artifacts
 Method1 - Manually:

 Initial users screen
 [[Image(https://i.imgur.com/0Jl0XmF.png)]]

 Users screen after manually updating the email to uppercase version
 (notification NOT triggered)
 [[Image(https://i.imgur.com/ZnZCWVN.jpeg)]]

 Users screen after manually updating the email to a different email
 (notification triggered)
 [[Image(https://i.imgur.com/j09jnrY.jpeg)]]


 ----

 Method2 - Programmatically:

 functions.php code
 [[Image(https://i.imgur.com/UOeOoHI.png)]]

 Users screen after changing email programmatically (notification NOT
 triggered)
 [[Image(https://i.imgur.com/1vluAsB.png)]]

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


More information about the wp-trac mailing list