By default, Symfony2 matches usernames case-sensitively. I want users to be able to enter johnsmith, JohnSmith, johnSMITH, or any variant of that, and have them all register as johnsmith. How do I do this?
I though the easiest way would be to always convert each username to lower-case before comparing them. This is easy to do on the one side (just throw a lower()
into the SQL statement), but how do I do that for what the user types in in the login form? Since Symfony automatically takes care of the login_check
route handling, I can't figure it out.
Better yet, is there some option I can set to enable case-insensitivity instead?