Login username case sensitive

Hi,

I’ve found out that if a user types his e-mail using one or more capital letters and tries to log in, BF returns an error “No record found for Email@test.com”, even if there is a user email@test.com in the Helper File. Is there a way to make this not case sensitive?

Thanks

The simplest way to resolve this would be to have a function action run before your authLogin action fires. The function would take the email and convert it to lower case before proceeding.

model.email = model.email.toLowerCase()

An example of your actions array would look like:

        [{
            "action": "function",
            "function": "model.isLoading = true\n\nif (model.email)\n    model.email = model.email.toLowerCase()",
            "options": {}
        }, {
            "action": "authLogin"
        }, {
            "action": "function",
            "function": "model.isLoading = false",
            "options": {}
        }]
1 Like