Good afternoon everyone.
OK, I have a site where the people register for a yearly membership, and they do receive a real card by mail with a 9 digits card numbers.
I’ve created a script that assigns a random and unique card number upon registration, and I’ve used that as username. This way made sense so that people could login to their profile using their card number (like air miles 😉
Problem is some people forget their card number, so they use the forgot my card number form (which is the forgot my username one).
BUT, I would like people to be able to use either their card number (username) OR email to login.
What hook should I look into so that I can :
1. Check to see if the username requested exists
2. If not, look for it in the emails of the members in the database
3. Retrieve the username associated with that email
4. Use that username for the login script
I’m using the exp:member:login_form function.
Thanks for your help