User.query.filter(User.id == current_user.id).delete() #DELETES THE ACCOUNT logout_user() # LOGS THE USER OUT return redirect # REDIRECT TO YOUR LOGIN PAGE