i want set plone website redirect came_from parameter in url after user logout. login set string:${globals_view/navigationrooturl}/login?came_from=${context/absolute_url}
, working.
for logout not working. tried event:
<subscriber for="products.plonepas.events.userloggedoutevent" handler="blabla.gocamefromafterlogout" />
using:
def gocamefromafterlogout(event): """ redirects user came_from url parameter after logout """ import pdb; pdb.set_trace( ) request = event.object.request came_from = request.form.get('came_from', none) if came_from: response = request.response response.redirect(came_from)
the event ok, came_from parameter ok, code not working how want. website redirects me /logged_out
every time.
so, how can set this?
a simple way: customize logged_out
, transform python script redirect whatever page want:
context.request.response.redirect(url)
Comments
Post a Comment