WordPress.org

Make WordPress Core

Opened 10 months ago

Last modified 9 months ago

#52976 new defect (bug)

user emails comparison should be case insensitive — at Initial Version

Reported by: asaifm Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.3
Component: Users Keywords: good-first-bug has-patch
Focuses: Cc:

Description

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:

if ( isset( $userdata['user_email'] ) && $user['user_email'] !== $userdata['user_email'] )


Can the function:

strcasecmp

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

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

Change History (0)

Note: See TracTickets for help on using tickets.