Custom auth_user fields

45 views
Skip to first unread message

xgp.l...@gmail.com

unread,
Jun 30, 2026, 8:04:47 AMJun 30
to py4web
Hi

Is there a way like web2py to define a custom table auth_user.


Regards,

domel zetaz

unread,
Jul 7, 2026, 10:39:56 AMJul 7
to py4web
https://groups.google.com/g/py4web/c/0-IeEm2_t4o/m/_hmS4dm3FAAJ

....
auth = Auth(
    session,
    db,
    define_tables=False,
    allowed_actions=["change_password", "login", "logout", "profile"]
)
auth.extra_auth_user_fields = [Field('field_1', length=25),
                               Field('field_2', length=50),
                               auth.signature]
auth.define_tables()

domel zetaz

unread,
Jul 7, 2026, 10:40:03 AMJul 7
to py4web
¡Ups!
This is what it ends up with

auth = Auth(session, db, define_tables=True, extra_fields=auth_extra_fields) db.commit()

El martes, 30 de junio de 2026 a las 9:04:47 UTC-3, xgp.l...@gmail.com escribió:
Reply all
Reply to author
Forward
0 new messages