4

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?

1

2 Answers 2

6

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.

7
  • Thanks @Himanshu but I am not in development. Is it possible to do it without coding Feb 28, 2016 at 8:06
  • Are you system administrator?
    – Himanshu
    Feb 28, 2016 at 8:07
  • @kunalgupta appexchange.salesforce.com/…
    – kurunve
    Feb 28, 2016 at 9:02
  • @kunalgupta check the updated answer. it is easy enough :)
    – Himanshu
    Feb 28, 2016 at 9:10
  • @Himanshu: I tried with your above code but got an error message .Would I have to write any class also related to this Feb 29, 2016 at 9:03
7

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.

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .