aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fietsboek/views/user_data.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/fietsboek/views/user_data.py b/fietsboek/views/user_data.py
index 45c499c..2f6daef 100644
--- a/fietsboek/views/user_data.py
+++ b/fietsboek/views/user_data.py
@@ -4,6 +4,7 @@ import datetime
from pyramid.httpexceptions import HTTPForbidden, HTTPFound, HTTPNotFound
from pyramid.i18n import TranslationString as _
from pyramid.request import Request
+from pyramid.security import remember
from pyramid.view import view_config
from sqlalchemy import select
@@ -62,7 +63,8 @@ def do_change_profile(request):
if identity.name != name:
identity.name = name
request.session.flash(request.localizer.translate(_("flash.personal_data_updated")))
- return HTTPFound(request.route_url("user-data"))
+ headers = remember(request, identity.authenticated_user_id())
+ return HTTPFound(request.route_url("user-data"), headers=headers)
@view_config(route_name="add-friend", permission="user", request_method="POST")