In the init application I defined the following link:
<a class="btn btn-default btn-sm"
onclick="javascript:openwindow('{{=URL('myleonexus', 'default', 'user',
args='login', vars=dict(_next=URL('myleonexus', 'grouphandler', 'connect',
args=[request.args(0), subgroupID], scheme=MYSCHEME, host=MYDOMAIN)))}}',
'connect')" role="button">Join</a>
Which is rendered as follows:
<a role="button"
onclick="javascript:openwindow('/myleonexus/default/user/login?_next=http%3A%2F%2F127.0.0.1%3A8000%2Fmyleonexus%2Fgrouphandler%2Fconnect%2F8%2F2',
'connect')" class="btn btn-default btn-sm">Join</a>
In the myleonexus application I have this setting:
auth.settings.login_next = URL('default', 'index')
I am facing two problems:
1. When the user is already logged in he is still directed to
default/user/login
2. After login default/user/login redirects to default/index instead of the
function in _next.
I started coding a solution, making use of if auth.is_logged_in(): and
if request.vars_next, however, I thought maybe there is an easier way
to solve these problems.
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.