Resetting a password for a user
To set a user's password to a different value, use the User object.
To set a password
- Query for the appropriate InfoObject using InfoStore.Query.
- Use the PluginInterface to retrieve the User object.
- Set the NewPassword property using the User object.
- Commit the modified collection back to the APS to save the changes.
Example
var Users = IStore.Query("SELECT Top 1* FROM CI_SYSTEMOBJECTS WHERE SI_PROGID='CrystalEnterprise.USER' And SI_ID="+UserID+"");
Users.Item(1).PluginInterface("").NewPassword = "Boo";
IStore.Commit (Users);
Remarks
The NewPassword property is write-only: you cannot retrieve a user's existing password. You can also use the ChangePassword method to change a password if you want to use the current password as confirmation of the user's authenticity.