Got a syntax error there, sorry:
El lunes, 17 de junio de 2019, 9:44:10 (UTC-4), Yoel Benitez Fonseca
escribió:
>
> I think you can do it in the default/user function. Having in account that
> the call to auth() probably raises a HTTP exceptiong in case of a success.
> This example is only a proof of concept:
>
> def user():
> form = CAT()
>
> try:
> form = auth()
> except HTTP as e:
> if e.status == 303:
> if ('login' in request.args) and auth.user:
> # probably a success, u can test if auth.user is o not None
> do_your_loging_event_here()
> elif 'logout' if request.args:
> do_your_logout_event_here()
>
> return dict(form=form)
>
>
>
>
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/web2py/a9e81732-268c-43d4-b860-390f016d4de5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.