Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

enter image description here

enter image description here

I had a user whose email address has been changed to another user. Now the new user gets an email to change the password along with the security question of the previous user.

How can I prevent the new user to see the security question of the previous user?

share|improve this question
Not sure this will help or not but check once… – Ratan Feb 28 at 8:24
up vote 4 down vote accepted

If you are a system administrator you can set user password using System.setPassword method

System.setPassword(userId, password as plain text)
  1. Login as system administrator.
  2. Click on Developer console as shown below

enter image description here

  1. Select developer console and execute above code.

enter image description here

When the user logs in with this password, they are not prompted to create a new password and after that he can reset security question.

share|improve this answer
Thanks @Himanshu but I am not in development. Is it possible to do it without coding – kunal gupta Feb 28 at 8:06
Are you system administrator? – Himanshu Feb 28 at 8:07
@kunalgupta… – kurunve Feb 28 at 9:02
@kunalgupta check the updated answer. it is easy enough :) – Himanshu Feb 28 at 9:10
@Himanshu : You are awesome brother :) Thanks – kunal gupta Feb 28 at 17:19

To prevent the security question from appearing, you have to reset the password.

It looks like you let a (new) user take the account of another user. That's not a good practice. It's better to disable a user, and create a new account for the new user.

share|improve this answer
actually we had less licenses, so inorder to use the inactive one, I had to put the new user – kunal gupta Feb 28 at 7:57
Is there any other option? – kunal gupta Feb 28 at 7:58
When you deactivate a user, the licence comes available for the new user – Fred Feb 28 at 7:59
@kunalgupta Don't recycle users if you can help it. It really does make things hard to manage after a while. – sfdcfox Feb 28 at 8:39

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.