I defined a custom auth_user table
## custom auth_user table
db.define_table(
auth.settings.table_user_name,
Field('first_name'),
Field('last_name'),
Field('email', length=128, default='', requires=[IS_EMAIL(), IS_NOT_IN_DB(db, 'auth_user.email')], notnull=True, unique=True'),
Field('username', length=32, default='', requires=[ IS_NOT_EMPTY(), IS_NOT_IN_DB(db, 'auth_user.username')], notnull=True, unique=True, writable=False, readable=False),
Field('password', type='password', length=512, requires=[IS_STRONG(),CRYPT()], writable=False, readable=False),
Field('nodeID', 'reference nd_node', requires=[IS_EMPTY_OR(IS_IN_DB(db, '
nd_node.id', '%(id)s'))], ondelete='CASCADE', writable=False, readable=False),
Field('registration_key', length=512, default='', writable=False, readable=False),
Field('reset_password_key', length=512, default='', writable=False, readable=False),
Field('registration_id', length=512, default='', writable=False, readable=False),
Field('createdOn', **attributes),
Field('modifiedOn', update=request.now, **attributes))
## get the custom_auth_table
custom_auth_table = db[auth.settings.table_user_name]
## tell auth to use custom_auth_table
auth.settings.table_user = custom_auth_table
## create all tables needed by auth if not custom tables
auth.define_tables(migrate=False, username=True, signature=False)
What's wrong with this definition?
Kind regards,
Annet