On Tuesday, November 29, 2011 1:28:33 PM UTC-5, Constantine Vasil wrote: > > Basically the solution is like this: > > from gluon.tools import Auth > auth = Auth(db) > auth.define_tables(username=False) > db.auth_user.first_name.writable = db.auth_user.first_name.readable = > False > db.auth_user.last_name.writable = db.auth_user.last_name.readable =False > > This will leave only email address/password. > > As I understand email address now is considered as username by web2py > automatically? > > email address/password Sign Up makes possible users to become members > realy quick. There is one downside though - what if they forgot which email > address they use as an username? The solution is to have an alternative > email address and retrieve_username to show Enter your email address. Then > the user can enter his alternative Email address and there to receive his > actual Email address used as an username. And how about a better option - > the alternative Email address to be allowed to be used as an username - so > to say to have a list of valid email addresses/password. >
Seems like a lot of hassle. If the user doesn't recall which email address was used as the main username, why would they recall which they used as the backup? Most users probably don't have more than two or three possible email addresses, so trying them all wouldn't be too difficult (presumably this would only be a problem for infrequent users). Anyway, you'd probably have to write a custom login function to allow multiple possible usernames. You could store the backup email address in a separate field. Anthony