Apex/class method System.movePassword(targetUserId,sourceUserId)
|Knowledge Article Number||000247142|
|Description||Customers can request to have access to the following Apex method released in Winter 17:
The movePassword method nulls out the source user's password so that user can no longer log in without a password reset, movePassword when called on the target user more than once will have no effect, and movePassword clobbers the target user's password with no way to recover it as mentioned above.
This doesn't affect things like password history or obey any other settings in the org like updated password policies and such.
Example Use case:
Users from one license to another(like moving Customer Community licensed user to Customer Community Plus license). To do this, it was required that the new user should have same password as that of the old user.
The old user would get deactivated later after new user is created and ready to use. Also, both target user and source user must be Active to use this method.
How to get access to this class/method:
This method is available in Winter 17 and customers should open a case with Support to get it enabled and provide his written approval with consent and understanding of the consequences mentioned above.