code: public void removeLocks(CmsUUID userId) {
  
          Iterator<CmsLock> itLocks = OpenCms.getMemoryMonitor().getAllCachedLocks().iterator();
          while (itLocks.hasNext()) {
              CmsLock currentLock = itLocks.next();
              boolean editLock = currentLock.getEditionLock().getUserId().equals(userId);
              boolean sysLock = currentLock.getSystemLock().getUserId().equals(userId);
              if (editLock) {
                  unlockResource(currentLock.getResourceName(), false);
              }
              if (sysLock) {
                  unlockResource(currentLock.getResourceName(), true);
              }
          }
      }
docs: Removes all locks of a user.<p>
  
  Edition and system locks are removed.<p>
  
  @param userId the id of the user whose locks should be removed