Bugfixes after merge

This commit is contained in:
Ozzie Isaacs
2023-01-28 18:59:14 +01:00
parent 508e2b4d0a
commit 260a694834
2 changed files with 4 additions and 4 deletions
+3 -3
View File
@@ -1393,9 +1393,9 @@ def change_profile(kobo_support, local_oauth_check, oauth_status, translations,
to_save = request.form.to_dict()
current_user.random_books = 0
try:
if current_user.role_passwd() or current_user.role_admin():
if to_save.get('password', "") != "":
current_user.password = generate_password_hash(to_save.get("password"))
if current_user.role_passwd() or current_user.role_admin():
if to_save.get('password', "") != "":
current_user.password = generate_password_hash(to_save.get("password"))
if to_save.get("eReader_mail", current_user.kindle_mail) != current_user.kindle_mail:
current_user.kindle_mail = valid_email(to_save.get("eReader_mail"))
new_email = valid_email(to_save.get("email", current_user.email))