Esempio n. 1
0
def admin_delete_user(user_id):
    if current_user.role != "ADMIN":
        return render_template("index.html", msg=msg_admin_feature)
    Item.delete_items_by_userid(user_id)
    List.delete_lists_by_userid(user_id)
    User.delete_user_by_userid(user_id)
    return redirect(url_for("list_users_with_item_amounts"))
Esempio n. 2
0
 def completely_delete_user(id):
     Item.delete_items_by_userid(id)
     List.delete_lists_by_userid(id)
     User.delete_user_by_userid(id)