From b66859d639373ea83d55cdc526fc145ef06db761 Mon Sep 17 00:00:00 2001 From: terrtia Date: Tue, 13 Aug 2024 16:27:37 +0200 Subject: [PATCH] fix: [users settings] fix user edit --- bin/lib/ail_users.py | 2 +- var/www/templates/settings/create_user.html | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/lib/ail_users.py b/bin/lib/ail_users.py index 6174598c..760ffbab 100755 --- a/bin/lib/ail_users.py +++ b/bin/lib/ail_users.py @@ -306,7 +306,7 @@ def create_user(user_id, password=None, admin_id=None, chg_passwd=True, role=Non # EDIT if exists_user(user_id): if password or chg_passwd: - edit_user(user_id, password_hash, chg_passwd=chg_passwd) + edit_user(user_id, password_hash, chg_passwd=chg_passwd, otp=otp) if role: edit_user_role(user_id, role) # CREATE USER diff --git a/var/www/templates/settings/create_user.html b/var/www/templates/settings/create_user.html index c5f0432c..35e7b8df 100644 --- a/var/www/templates/settings/create_user.html +++ b/var/www/templates/settings/create_user.html @@ -49,7 +49,12 @@

{% if meta['id'] %}Edit{% else %}Create{% endif %} User

- + {% if meta['id'] %} + + + {% else %} + + {% endif %} {% if error_mail %}
Please provide a valid email address
{% endif %}