All,
I am working on an MVC3 c# site. I need the ability for a user to request a new password. The requirement is that they enter either:
- Their customerId if they know if
OR
- Their chosen username in the one textbox
Both are unique in the database.
Once they enter either of these, a 'change password' link is sent to them in an email.
My question is, I am using one text box for them to enter either of these.
How do I know what one they entered?
Do I validate for a username and if this fails then validate for a customerId. If these both fail validation then I show them a message.
If one of these validates then I send them the password link.