public void makeCreator(Long userId) { VDCUser user = em.find(VDCUser.class, userId); VDCNetwork vdcNetwork = vdcNetworkService.find(); // If the user already has a networkRole, then he is already a creator or networkAdmin, // so don't need to change the role. if (user.getNetworkRole() == null) { user.setNetworkRole(networkRoleService.getCreatorRole()); mailService.sendCreatorAccountNotification(vdcNetwork.getContactEmail(), user.getUserName()); } }