On Thursday, November 29, 2012 10:34:13 AM UTC-5, Massimo Di Pierro wrote: > 1) good point. We have the following functions but they are not documented: > > def get_or_create_user(self, keys, update_fields=['email']): > def login_bare(self, username, password) >
login_bare() is documented: http://web2py.com/books/default/chapter/29/09#Manual-Authentication Also, note that auth.logout() is not form-based and can be called programmatically. > > 2) you can use auth.define_tables(username=True) so that email is not used > for login. The problem is that you still need to communicate with users and > this is what the email field is for. In principle you can hide the email > field if you do not need to comunicate with users. > In addition to hiding the email field, you can also define a custom auth_user table that excludes the email field. In either case, everything should work fine, except of course the Auth actions that require sending emails to users (e.g., verify registration, retrieve password, etc.). Maybe we could add an option to auth.define_tables() to automatically hide or exclude the email field. Anthony --