Assuming the user() function is in the default controller, you can't
require login to get to that function because that's the function used for
login. Instead, you could do something like:
if request.function != 'user':
auth.requires_login()(lambda: None)()
That will skip the login requirement in case the request is for the user
function.
Anthony
On Wednesday, March 26, 2014 5:16:05 PM UTC-4, 黄祥 wrote:
> hi,
>
> i have auth.requires_login()(lambda: None)() in default controller and it
> return indirect loop.
> is it possible to use auth.requires_login()(lambda: None)() in default
> controller?
>
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.