I'm trying to figure out a MySQL query expression to match an email
address. Here's the situation:
User registers on my site with a "plus style" email address
(us**********@example.com). This is a perfectly legal address and I
don't want to disallow it, because I use this style myself and find
it useful. For example us***********@gmail.com will get delivered
to
us**@gmail.com.
Now, the user forgets his password. He is prompted to enter his
email address, to which my site will send a temporary password.
Problem: if he enters
us******@example.com instead of the address
us**********@example.com that's stored in my database, I should be
able to find the address. How do I construct a MySQL query to match
what the user enters with the "plus" address in the database?
The simplest way is to strip the +suffix from the username when the user
first registers on my site, but I'd rather not do that.
-A