Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X
Can I change a user's password from a service?
I have tried this.
var newPassword="pickles"
var params = {
data: newPassword
};
// result: STRING
var encryptedPassword = Resources["EncryptionServices"].Encrypt({
data: newPassword
});
Users["testuser1"].password=encryptedPassword
But the property password does not exist.
Hi Bill,
If you go to entities and find the user you would like to set the password for, there is a code snippet named, ChangePassword, that can be used to change the password of a user that already has a password assigned. It requests the current password before allowing you to change it as a security measure. This is the one you would typically use. Alternatively, there is also the service, AssignNewPassword, which doesn't require the old password before assigning a new one. This would be useful in fewer cases and would most likely be used for administrative purposes if a password was forgotten.
Thanks,
Saeed
Hello Saeed,
Why can't i find ChangePassword or AssignNewPassword snippet?
Thanks,
Alex
They are both part of the User object.
So if you go to the Entities tab and find a user, in the Services you'll find these two.
Thanks Pai
I was looking at wrong place
I looked at Snippets Tab > EntityServices ,Insted.
Thanks,
Alex