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

WordPress Trac noreply at wordpress.org
Tue Apr 6 00:08:20 UTC 2021


#52976: user emails comparison should be case insensitive
--------------------------+-----------------------------
 Reporter:  asaifm        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  5.7
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In user.php for wordpress 5.7:
 [https://core.trac.wordpress.org/browser/tags/5.7/src/wp-
 includes/user.php] email update comparisons are case sensitive. Is there a
 specific reason for this? Because emails are case insensitive. Here is the
 line that does that:
 {{{
 #!php
 if ( isset( $userdata['user_email'] ) && $user['user_email'] !==
 $userdata['user_email'] )
 }}}

 Can the function:
 {{{
 #!php
 strcasecmp
 }}}

 be used instead? The problem is that there is a plugin that uses the
 function:

 {{{
 #!php
 wp_update_user
 }}}

 And it would send a notification for email change even if it was the
 casing of the characters only.

 Thanks for your time and consideration

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


More information about the wp-trac mailing list