FriendsOfSymfony/FOSUserBundle — comment on commit e4ef0db6bf72b860717e5346bbb189bc34057f66
File:  line 0
By jmikola:

@stof: OrnicarMessageBundle's ParticipantInterface requires a `getId()` method on the User, but there's no reason that would conflict with another interface's `getId()` method unless the parameters were different.

Regarding performance, I think there are indexing hints for `usernameCanonical` fields. In MongoDB, that should entail as speedy a lookup as the id.

At Exercise.com, users don't have the ability to change their username. They can change their email, and our login form will let you use whichever you prefer. There are still cases where admins have had to go in and change usernames, though. I can understand that a UserInterface would not dictate an identifier field, but it doesn't make sense in practice. Trusting a field entered by the user to remain immutable during the lifetime of your application seems like asking for trouble.