mcottondesign

Loving Open-Souce One Anonymous Function at a Time.

work

We are currently working on making our login system more forgiving. We started by creating usernames, and then people forgot their usernames so we now we are wanting to use e-mail addresses as usernames. This is great except for the users who remember their username.

We decided to try logging in assuming they gave us a username, if that fails, try it again matching against their email.

While we are at it we also smush everything down to lowercase so that we can eliminate some typos. We are don't differentiate 'Bob' and 'bob'.

UPDATE table set email = LOWER(email);