The Auth settings should work the same in either case. Please show your exact code (model, controller, view) and describe the exact workflow (i.e., exactly what you do and see in the UI) in both cases.
Also, note that if you just want to change the visibility and/or validators of particular fields, you can do so without a custom table definition. Just apply the changes after defining the table. For example: def hide_fields(table, fieldnames): for fieldname in fieldnames: table[fieldname].readable = table[fieldname].writeable = False hide_fields(db.auth_user, ['first_name', 'last_name', 'email']) Anthony On Tuesday, June 5, 2018 at 3:13:11 PM UTC-4, b.l. masters wrote: > > Hi > > I've created a custom auth table to hide unwanted fields, and add > validators in the db.py file to better manage the registration process. As > part of this, within the db.py, I also include lines to *not* require > verification or approval. When I use .../default/user/register this > feature works just as expected. > > However, when I call the form, in default.py using: > > form=auth.register() > > It appears as I need to when embed {{=form}} into the view. However, once > the registration is complete it is still requiring verification. How can I > get requires_verification = False to apply to my embedded form as well? > > Below, I pasted the table definition and related settings, in db.py > (note, I also tried changing the settings with the custom table name, and > this did not work). > > On a related note, I did try to avoid creating a custom auth table, and > just add some extra fields to the existing one. But I could not get any > validators to work to be ale to "hide" the required fields that I don't > want that are part of auth, nor to be able to modify the other features I > wanted. > > Thanks for any help > > --- > > db.define_table( > auth.settings.table_user_name, > Field('first_name', length=128, default='', writable=False, > readable=False), > Field('last_name', length=128, default='', writable=False, > readable=False, ), > Field('username', label=T('Username'), length=128, default='', > unique=True), > Field('email', length=128, writable=False, readable=False), # required > Field('password', 'password', length=512, # required > readable=False, label=T('Password')), > Field('token', label=T('Invite Code'), length=128, default=''), > Field('new_status', type='boolean', writable=False, readable=False), > Field('registration_key', length=512, # required > writable=False, readable=False, default=''), > Field('reset_password_key', length=512, # required > writable=False, readable=False, default=''), > Field('registration_id', length=512, # required > writable=False, readable=False, default='')) > > custom_auth_table = db[auth.settings.table_user_name] # get the > custom_auth_table > > auth.settings.registration_requires_verification = False > auth.settings.registration_requires_approval = False > auth.settings.login_after_registration = True > auth.settings.login_next = URL('appname', 'accounts', 'index') > auth.settings.register_next = URL('appname', 'accounts', 'index') > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.