Resetting a password for a user

To set a user's password to a different value, use the User object.

To set a password
  1. Query for the appropriate InfoObject using InfoStore.Query.
  2. Use the PluginInterface to retrieve the User object.
  3. Set the NewPassword property using the User object.
  4. 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.



Crystal Decisions, Inc.
http://www.crystaldecisions.com
Support services:
http://support.crystaldecisions.com