[wp-trac] [WordPress Trac] #58311: Validate Username for not to be a email and strip everything after @

WordPress Trac noreply at wordpress.org
Tue Aug 15 12:07:25 UTC 2023


#58311: Validate Username for not to be a email and strip everything after @
----------------------------------------+------------------------------
 Reporter:  oglekler                    |       Owner:  (none)
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Login and Registration      |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  2nd-opinion needs-dev-note  |     Focuses:
----------------------------------------+------------------------------
Changes (by rajinsharwar):

 * keywords:  has-patch needs-testing needs-unit-tests 2nd-opinion => 2nd-
     opinion needs-dev-note


Comment:

 Replying to [comment:8 knutsp]:
 > Both usernames and user emails are unique. But one user account may have
 the exact same username as an other account's email. So, which account are
 you trying to log into, which password is to be checked and what user id
 to be assigned when successful?

 I checked on that, and it does seem that the user, with whom the password
 matches is the one, that it logs with.

 What I would suggest is, while creating a new user with an email, it
 should be checked that if that email is someone's username. The same goes
 for the username, we should check if that username matches with any user's
 email. But, we need suggestions about what we should do for existing users
 who are currently having this edge case.

 For me, I don't think using any filters to strip out the username would be
 a great way to go.

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


More information about the wp-trac mailing list