} else {
Collection collection = null;
try {
collection = new LocalCollection(contextUser, context.getBroker().getBrokerPool(), XmldbURI.ROOT_COLLECTION_URI, context.getAccessContext());
final UserManagementService ums = (UserManagementService) collection.getService("UserManagementService", "1.0");
final Account userObj = ums.getAccount(user);
if (null != userObj)
{ums.removeAccount(userObj);}
} catch (final XMLDBException xe) {
throw new XPathException(this, "Failed to remove user " + user, xe);
} finally {