Hello,
im trying to Change the Password of a user in a groovy script. I try to Change my own Password and im Administrator.
When i read the Password (before change) of the user object, Password ist empty.
Then i create an updateDescriptor and set new firstname and new Password and i update the user with this descriptor. After updateUser new firstname ist correct but Password is empty.
When i take a look in the updateDescriptor string representation (see below) everything seems ok. But the user Password is not updated.
… and i have no idea why. I checked it also in the database and the field is empty.
final UserUpdater updateDescriptor = new UserUpdater();
User currentUser = BonitaUsers.getProcessInstanceInitiator(apiAccessor,processInstanceId);
log.severe ("OLD PASSWORD:" + apiAccessor.getIdentityAPI().getUser(currentUser.getId()).password);
updateDescriptor.setPassword("xxx");
updateDescriptor.setFirstName("Doris");
log.severe ("UpdateDescriptor: " + updateDescriptor.toString());
apiAccessor.getIdentityAPI().updateUser(currentUser.getId(), updateDescriptor)
log.severe ("NEW PASSWORD:" + apiAccessor.getIdentityAPI().getUser(currentUser.getId()).password);
Hi,
thanks for your answer, i also think thats not a Problem of the Code snippet, but ive no idea what the Problem is. Located is my Code in the operations part of a execution tab. I have the newest community Version with mySQL, but i have the Problem also in Studio (on the same machine). Is it the Location of the Code snippet?
When i take a look in the mySQL database, the Password field is completely empty after run and i cannot Login with any Password.
Is perhaps there any encryption Settings missing in my config files or something else?
Is there any other Chance to make Password changes? We Need it for a flow, that users can Change their Password.
Bonitasoft empowers development teams with Bonita, the open-source and extensible platform to solve the most demanding process automation use cases. The Bonita platform accelerates delivery of complex applications with clear separation between capabilities for visual programming and for coding. Bonita integrates with existing solutions, orchestrates heterogeneous systems, and provides deep visibility into processes across the organization.