FriendsOfSymfony/FOSUserBundle — pull request #1336 by azine (2013-11-18 16:04:56+00:00)
Title: Also find users with email-address as their "username" and different email-address as "email"

Hi,

I want to fix the following scenario:

A user registered with the username "mymail@email.com" and the email address "mymail@email.com".
Later that user edits his/her profile and changes his email to "myotheremail@email.com" (or (s)he uses two different email-addresses already when registering).

So there is a user with "mymail@email.com" as username and "myotheremail@email.com" as email.

With the current implementation of the UserManager, this user will not be able to login with his/her username.

This pull-request tries to fix this.

Cheers,
Dominik