Closed Siyfion closed 9 years ago
Just implemented this, be careful though because if there are users with uppercase usernames or passwords, they won't be able to log in anymore!
Fantastic!! Great work @ianmartorell
@ianmartorell I've just seen that this has been implemented such that it works with username and password, but not when you allow login with username OR email...
Is this something you would consider adding?
Of course! Forgot about email
@ianmartorell thanks, it's just I allow username or email login, so it hasn't had any effect for me! lol. :+1:
@ianmartorell it's this one: var usernameOrEmail = trimmedElementValueById('login-username-or-email');
that affects me! ;)
Ahh okay, I see what you mean now, let me see
How about now? the field will only be converted to lowercase if both forceEmailLowercase and forceUsernameLowercase are set to true.
Yep, looks good to me! :+1:
Is there a way I can force the login to do a
.toLowerCase()
on the email or username field before attempting to log in? All of our usernames and emails are forced to lowercase, but for ease-of-use I'd like to allow customers to capitalise it in however they like when logging in... Is there any chance we could have an option for this? It's seems like it would be a relatively minor change to the login function.