def METHOD_NAME(_):
	# Boot everyone
	for user_sid in list(connected_users):  # Loop through a shallow copy to avoid modification issues
		disconnect(sid=user_sid)
	# Set chat_authorized to False for all users
	g.db.query(User).update({User.chat_authorized: False})
	# Delete all ChatMessage entries
	g.db.query(ChatMessage).delete()
    # Commit the changes to the database
	g.db.commit()