From b43be1bfcc6b8a28569b04470c012435e38db9d8 Mon Sep 17 00:00:00 2001 From: Adrian Schmutzler Date: Fri, 19 Jan 2018 14:47:32 +0100 Subject: [PATCH] user.html: Log off user after he deleted himself Signed-off-by: Adrian Schmutzler --- ffmap/web/application.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ffmap/web/application.py b/ffmap/web/application.py index 0f956f9..f9bddab 100755 --- a/ffmap/web/application.py +++ b/ffmap/web/application.py @@ -340,6 +340,8 @@ def user_info(nickname): mysql.commit() flash("User %s deleted!" % nickname, "success") mysql.close() + if user["nickname"] == session.get("user"): + session.pop('user', None) return redirect(url_for("user_list")) else: flash("You are not authorized to perform this action!", "danger")