[opencms-dev] Programmatically reset Password

Bernhard Zebedin bernhard.zebedin at visions2.net
Wed Nov 8 14:48:19 CET 2017


Dear all.

Maybe someone can help me why my password reset is not working.

I do something like this in my .jsp file:



CmsWorkplace cmsWorkplace = new CmsWorkplace(pageContext, request, response);
CmsObject cmsoRegister = cmsWorkplace.getCms();
....
String userName = "/webou/"+checkUserName;
String passWord = RandomStringUtils.randomAlphabetic(8);
....
CmsUser user = cmsoRegister.readUser(userName);
cmsoRegister.setPassword(user.getName(), passWord);
cmsoRegister.writeUser(user);



I have no error logs in opencms.log...no exceptions where thrown... but the password is not written do database.

Is there any publishing needed?


kind regards

Bernhard

Working on OpenCMS 10.5.3
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20171108/308dbc65/attachment.htm>


More information about the opencms-dev mailing list