When you attempt to access a protected URL and are not logged in, web2py
redirects to the login page and puts the original URL in the _next
variable, which results in a post-login redirect to the originally
requested URL. auth.settings.login_next doesn't do anything if the login
URL already contains a _next variable -- it only serves as a default
post-login redirect in case the URL doesn't already contain a _next
variable.
Anthony
On Tuesday, June 17, 2014 3:08:54 PM UTC-4, Annet wrote:
>
> In my application I have the following setting:
>
> auth.settings.login_next = URL('myleonexus', 'default', 'my_login')
>
> my_login generates menus and sets some variables.
>
>
> The problem is that when I have a link in an e-mail:
>
> https://my.leonexus/myleonexus/grouphandler/confirm_connect/7/2
>
> and the user isn't logged in, web2py correctly requires the user to login,
> and then redirects to myleonexus/grouphandler/confirm_connect/7/2
> However, the menus aren't generated and the variables don't get
> a value assigned to them.
>
> Why does web2py in this case not execute my_login?
>
> Kind regards,
>
> Annet
>
>
--
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.