Using ASP.NET forms authentication, how do you accept an email address and password, use an email address to search for a username, and then write them down by searching for a username and password?
We have this card system with employee numbers, but no one remembers their numbers. Using email addresses for logging in will be obvious, but the rest of the application depends on the username being the employee number.
Thanks. Links to code / examples would be great.
Our current C # solution ends with an empty reference exception:
Response.Write(Membership.GetUser().UserName);
but both of these functions are wonderful:
string userName = Membership.GetUserNameByEmail(emailAddress);
bool successfulLogin = Membership.ValidateUser(userName, password);