private void cancelAllSubscriptions(PubSubService service, JID user) {
        for (Node node : service.getNodes()) {
            NodeAffiliate affiliate = node.getAffiliate(user);
            if (affiliate == null) {
                continue;
            }
            for (NodeSubscription subscription : affiliate.getSubscriptions()) {
                // Cancel subscription
                node.cancelSubscription(subscription);
            }
        }
    }
Terminates the subscription of the specified entity to all nodes hosted at the service.
The affiliation with the node will be removed if the entity was not a node owner or
publisher.

@param service the PubSub service this action is to be performed for.
@param user the entity that no longer exists.
xmppserver/src/main/java/org/jivesoftware/openfire/pubsub/PubSubEngine.java