Thursday, October 25, 2012

Change Password using apex code

setPasswordID userID
String password
VoidSets the password for the specified user. When the user logs in with this password, they are not prompted to create a new password. Use resetPassword if you want the user to go through the reset process and create their own password.
Warning
Be careful with this method, and do not expose this functionality to end-users.

e.g. System.setPassword('006A123ahjklkk','password123');
 

No comments:

Post a Comment