Merge branch 'bug/general-user-gravatar' into 'dev'

Bug/general user gravatar

See merge request crafty-controller/crafty-commander!232
This commit is contained in:
Andrew 2022-04-02 01:11:01 +00:00
commit f00830aeb5

View File

@ -1763,6 +1763,7 @@ class PanelHandler(BaseHandler):
user_data = {
"username": username,
"password": password0,
"email": email,
"lang": lang,
}
self.controller.users.update_user(user_id, user_data=user_data)
@ -1903,14 +1904,15 @@ class PanelHandler(BaseHandler):
lang = bleach.clean(
self.get_argument("lang", helper.get_setting("language"))
)
# We don't want a non-super user to be able to create a super user.
if superuser:
superuser = bleach.clean(self.get_argument("superuser", "0"))
new_superuser = bleach.clean(self.get_argument("superuser", "0"))
else:
superuser = "0"
new_superuser = "0"
if superuser == "1":
superuser = True
new_superuser = True
else:
superuser = False
new_superuser = False
if Enum_Permissions_Crafty.User_Config not in exec_user_crafty_permissions:
self.redirect(
@ -1938,7 +1940,7 @@ class PanelHandler(BaseHandler):
password=password0,
email=email,
enabled=enabled,
superuser=superuser,
superuser=new_superuser,
)
user_data = {
"roles": roles,