How to archive a user via the API
3 answers
For anyone interested, the code for archive user looks like this
IProgressMonitor monitor = new NullProgressMonitor();
IContributorManager cmgr = repo.contributorManager();
try {
IContributor contributor = cmgr.fetchContributorByUserId(userId, monitor);
contributor = (IContributor) contributor.getWorkingCopy();
contributor.setArchived(true);
cmgr.saveContributor(contributor, monitor);
} (catch ....)