Lock a user

Hallo,

I am very new to Camunda. I am trying to lock a user based on userId. The following is the process.

The following is my delegation code which contains logic to delete a user (not lock a user)

public void execute(DelegateExecution execution) throws Exception {
	IdentityService identityService = execution.getProcessEngine().getIdentityService();
	String userId = (String) execution.getVariable("userId");
	identityService.deleteUser(userId);
	List<User> users = identityService.createUserQuery().listPage(0, 10);
	LOGGER.info("Remaining users.... ");
	for (User user : users) {
		LOGGER.info("User " + user);
	}

}

Is there a possibility to lock a user for certain period of time?. Thank you

Best Regards,
Raghu

Hi @rpalakodety,

Currently, it’s not possible to lock a user. Users can be locked by the IdentityService if an incorrect password is entered too many times, however, the method is not available in the Public API.

Best,
Nikola