Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#36653 closed defect (bug) (duplicate)

Lost password Form not recognizing usernames that contains @ character

Reported by: machelinos's profile machelinos Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.4.2
Component: Login and Registration Keywords: has-patch needs-testing
Focuses: administration Cc:

Description

I have some users that on the username use the character @, for example "name @sitename" . Then if those users want to reset their passwords on the lost password form if they entered their username to get the reset link, it doesn't work. It marks the following error
ERROR: There is no user registered with that email address.

I think the form is interpreting for the @ character that is an email address and only searches for email addresses on the database and not usernames. It's really weird behavior but it only happens to my sites for usernames with the @ character, if i enter the email of the user the form works correctly, also for usernames that do not contain the @ character it works fine.

It can be a bug since WordPress allows for usernames to have the @ character but then on the lost password form it doesn't recognize those usernames.

I have deactivated every plugin and used the regular twenty sixteen theme.
I discovered this on Wordpress 4.4.2 but i have updated and it's doing the same on 4.5

Thanks for your help!

Attachments (1)

36653.01.diff (1.4 KB) - added by websupporter 9 years ago.
To try to login via email, we just checked if there is an @ in the login. I changed this to is_email. Furthermore, when we do not find a user by email, I propose, we check, if there is a username in the format of an email address.

Download all attachments as: .zip

Change History (5)

@websupporter
9 years ago

To try to login via email, we just checked if there is an @ in the login. I changed this to is_email. Furthermore, when we do not find a user by email, I propose, we check, if there is a username in the format of an email address.

#1 @websupporter
9 years ago

  • Keywords has-patch needs-testing added

#2 @websupporter
9 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #22367.

#3 @websupporter
9 years ago

Hi @machelinos,
thanks for reporting this. I think, it is already reported here: https://core.trac.wordpress.org/ticket/22367

#4 @SergeyBiryukov
9 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.