Yes that command will do it. If you want the system user to do it:
UserDestroyer.new(Discourse.system_user).destroy(User.find_by_username('...'), delete_posts: true)
Yes that command will do it. If you want the system user to do it:
UserDestroyer.new(Discourse.system_user).destroy(User.find_by_username('...'), delete_posts: true)