after that you call auth.define_tables()
it will use your own table, find "usrname" and use that instead of email. Massimo On Apr 5, 10:32 am, mdipierro <mdipie...@cs.depaul.edu> wrote: > all is needed is to use a custom defined table with a "username" > field. > > auth=Auth(globals(),db) > auth.settings.table_user = db.define_table( > self.settings.table_user_name, > db.Field('first_name', length=128,default=''), > db.Field('last_name', length=128,default=''), > db.Field('username', length=128,default=''), > db.Field('email', length=128,default=''), > db.Field('password', 'password', readable=False, > label='Password'), > db.Field('registration_key', length=128, > writable=False, readable=F\ > alse,default=''), > migrate=migrate) > table = auth.settings.table_user > table.first_name.requires = IS_NOT_EMPTY() > table.last_name.requires = IS_NOT_EMPTY() > table.password.requires = CRYPT() > table.username.requires = IS_NOT_IN_DB(db, '%s.username' \ > % > self.settings.table_user._tablename) > table.email.requires = [IS_EMAIL(), IS_NOT_IN_DB(db, '%s.email' \ > % > self.settings.table_user._tablename)] > > On Apr 5, 10:14 am, Joseph Jude <ceph...@gmail.com> wrote: > > > Hi All, > > What is needed to have userid rather than email in the user > > registration page of Auth? > > > Thank you, > > Joseph --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---