- is_first_login = (last_login == '2000/01/01' and
- ptool.getProperty('validate_email'))
- if is_first_login:
- member.setProperties(last_login_time='1999/01/01', login_time=now)
- target = '%s/password_form' % portal_url
- context.REQUEST.RESPONSE.redirect(target)
- return
- else:
- member.setProperties(last_login_time=last_login, login_time=now)
- came_from = context.REQUEST.get('came_from', None)
- if came_from:
- return context.REQUEST.RESPONSE.redirect(came_from)
- else :
- url = atool.getActionInfo('user/logged_in', object=portal)['url']
- url = '%s?%s' %(url, mq(portal_status_message=_('Login success')))
- return context.REQUEST.RESPONSE.redirect(url)
-
-return context.logged_in_template(**decode(options, script))
+ came_from = context.REQUEST.get('came_from', None)
+ if came_from:
+ return context.REQUEST.RESPONSE.redirect(came_from)
+ else :
+ url = '%s?%s' %(portal_url, mq(portal_status_message=_('Login success')))
+ return context.REQUEST.RESPONSE.redirect(url)