When the setting to allow users to login with email addresses or user names is selected, the incoming data is tested with leading and trailing spaces. This leads to confusion when attempting to login and can cause some issues when creating or testing new users because two users could end up with nearly identical username/emails because of the extra spaces. I can't really see a scenario in which the leading or trailing spaces could be useful so I think it is probably best to trim them off.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lliss created an issue. See original summary.

lliss’s picture

lliss’s picture

Status: Needs work » Needs review
riddhi.addweb’s picture

Status: Needs review » Reviewed & tested by the community

@lliss, Thanks for the patch, it works well as per the above mentioned requirements, It trails the extra spaces & successfully login us.
PFA results for the mentioned case.

riddhi.addweb’s picture

  • lliss authored b30c37a on 7.x-1.x
    Issue #2895648 by lliss, riddhi.addweb: Email address not recognized...
stevecowie’s picture

Status: Reviewed & tested by the community » Fixed

Now in 7.x

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.