|
|
@ -447,6 +447,8 @@ def delete_book_gdrive(book, book_format):
|
|
|
|
|
|
|
|
|
|
|
|
def reset_password(user_id):
|
|
|
|
def reset_password(user_id):
|
|
|
|
existing_user = ub.session.query(ub.User).filter(ub.User.id == user_id).first()
|
|
|
|
existing_user = ub.session.query(ub.User).filter(ub.User.id == user_id).first()
|
|
|
|
|
|
|
|
if not existing_user:
|
|
|
|
|
|
|
|
return 0, None
|
|
|
|
password = generate_random_password()
|
|
|
|
password = generate_random_password()
|
|
|
|
existing_user.password = generate_password_hash(password)
|
|
|
|
existing_user.password = generate_password_hash(password)
|
|
|
|
if not config.get_mail_server_configured():
|
|
|
|
if not config.get_mail_server_configured():
|
|
|
|