There is no built-in mechanism since we do not store the time when a password changes but you can do it in this way:
auth.settings.extra_fields['auth_user'] = [Field('password_charged_on','datetime',compute=lambda row: row.password and request.now, writable=False)] if auth.user and auth.user.password_charged_on + datetime.timedelta(days=30)<request.now: redirect(URL('some_error_page')) On Sunday, 28 June 2015 14:58:46 UTC-5, 黄祥 wrote: > > hi, > > just wondering is it possible to have expire password in web2py > application? perhaps something like the most os have (windows, linux) that > have an option to set the user password is expired let say in 90 days, or > 30 days. > > thanks and best regards, > stifan > -- 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.