not sure if something like that is implemented, but here's what you can do:
before validating form: 1. check if email is given in post vars (instead of username) 2. if it is, make select query to db to find out username related to given email 3. change variable (if email is given in username field, insert username instead) 4. username will be sent to validation instead of email you'll be using username field for login, but you can set label to "username or email" not sure if this fits, but if it is ok, i can give you exact code (i use something very similar to this) On Thu, Feb 3, 2011 at 8:18 PM, mattynoce <mattyn...@gmail.com> wrote: > hi all. i know we can use username instead of email by simply adding > username=True to auth, but i wanted to know if there happened to be a > way to use either. > > for example, i have parent and children users, and i want kids to use > username, since they might not have email addresses. but i want > parents to use username or email, whichever they can remember. > > so i'd like a field that accepts EITHER username or email, and checks > to see if either would allow login. i will figure out how to do this > on my own, but i wanted to see if there were something secret in auth > to do it automatically. > > thanks, > > matt