From cd8ce4f5bc36d4c03942317a5b70c119b24d7844 Mon Sep 17 00:00:00 2001 From: Eldeberen Date: Sat, 20 Feb 2021 19:32:18 +0100 Subject: [PATCH] admin: fix name edition through admin panel (#85) --- app/models/user.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/user.py b/app/models/user.py index 9b77b09..e3b7c30 100644 --- a/app/models/user.py +++ b/app/models/user.py @@ -10,6 +10,7 @@ from app.models.trophy import Trophy, TrophyMember, Title from app.models.notification import Notification import app.utils.unicode_names as unicode_names import app.utils.ldap as ldap +from app.utils.unicode_names import normalize from config import V5Config import werkzeug.security @@ -190,6 +191,9 @@ class Member(User): # TODO: verify good type of those args, think about the password mgt # Beware of LDAP injections + if "name" in data: + self.name = data["name"] + self.norm = normalize(data["name"]) if "email" in data: self.email = data["email"] if V5Config.USE_LDAP: