dromero
1
Hi
I want to change a password of an user so I was implemented this code:
var user = auth.getUser();
auth.changePassword({
userKey: user.key,
password: req.params[‘clavenuevacambioclave’]
});
However I got this error “com.enonic.xp.portal.impl.PortalException: TypeError: Cannot call undefined” on the line “changePassword”
Thank you for your help
mla
2
I don’t think auth.changePassword() was implemented in 6.1.1. Try using XP 6.2.0 and update your libs in build.gradle.
bwe
3
What Michael says is true. ChangePassword is a feature added to XP 6.2.
dromero
4
Yes I test it and It works.
Thank you
1 Like