admin: fix name edition through admin panel (#85)

This commit is contained in:
Eldeberen 2021-02-20 19:32:18 +01:00
parent 894a0b6549
commit cd8ce4f5bc
Signed by untrusted user: Darks
GPG Key ID: 7515644268BE1433
1 changed files with 4 additions and 0 deletions

View File

@ -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: