web/views/sessions.py
changeset 7868 39a54b88906d
parent 7854 d95a76df33a9
child 7909 71c70bf482cf
equal deleted inserted replaced
7859:15809afe093b 7868:39a54b88906d
    97             self._update_last_login_time(req)
    97             self._update_last_login_time(req)
    98         args = req.form
    98         args = req.form
    99         for forminternal_key in ('__form_id', '__domid', '__errorurl'):
    99         for forminternal_key in ('__form_id', '__domid', '__errorurl'):
   100             args.pop(forminternal_key, None)
   100             args.pop(forminternal_key, None)
   101         path = req.relative_path(False)
   101         path = req.relative_path(False)
   102         if path == 'login':
   102         if path in ('login', 'logout') or req.form.get('vid') == 'loggedout':
   103             path = 'view'
   103             path = 'view'
   104             args['__message'] = req._('welcome %s !') % req.user.login
   104             args['__message'] = req._('welcome %s !') % req.user.login
   105             if 'vid' in req.form:
   105             if 'vid' in req.form and req.form['vid'] != 'loggedout':
   106                 args['vid'] = req.form['vid']
   106                 args['vid'] = req.form['vid']
   107             if 'rql' in req.form:
   107             if 'rql' in req.form:
   108                 args['rql'] = req.form['rql']
   108                 args['rql'] = req.form['rql']
   109             raise Redirect(req.build_url(path, **args))
   109             raise Redirect(req.build_url(path, **args))
   110         req.set_message(req._('welcome %s !') % req.user.login)
   110         req.set_message(req._('welcome %s !') % req.user.login)