#36653 closed defect (bug) (duplicate)
Lost password Form not recognizing usernames that contains @ character
Reported by: | 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)
Change History (5)
#3
@
9 years ago
Hi @machelinos,
thanks for reporting this. I think, it is already reported here: https://core.trac.wordpress.org/ticket/22367
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.