2 from Products
.CMFCore
.utils
import getToolByName
3 from ZTUtils
import make_query
as mq
4 from Products
.CMFDefault
.utils
import Message
as _
6 utool
= getToolByName(context
, 'portal_url')
9 came_from
= req
.form
.get('came_from')
12 urlQs
= came_from
.split('?', 1)
14 came_from
= '%s?%s' % (urlQs
[0], mq(portal_status_message
=_('Login success')))
17 came_from
= '%s?%s&%s' % (url
, qs
, mq(portal_status_message
=_('Login success')))
18 return resp
.redirect(came_from
)
20 return resp
.redirect('%s?%s' % (utool(), mq(portal_status_message
=_('Login success'))))