I have just started to look at web2py and wish to use username rather than email to log in.
I have added the following :-
auth.define_tables(username=True, signature=False) and I need to add the validator, but I don't know where to put it (sounds silly I know).
I have tried a few options and looked at many examples - but they all create a new table rather than use the existing auth_user. I tried :-
auth_table = auth.settings.table_user auth_table.username.requires = IS_NOT_IN_DB(db, auth_table.username) auth.define_tables(username=True, signature=False) But auth_table is None.