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

I stumbled across a requirement that is to not allow the users to log in in the communities/portal upon self-registration until they confirm the registration (activation link must be sent through an email).

This is a standard process for almost every other portal on the net. It seems like that Salesforce doesn't have out-of-the-box functionality to support this yet.

At this stage I have only found a Question and an Idea.

My solution is to set the user Inactive upon registering and generate a random hash (before insert trigger) with an expiry date. Then change the default self-registration email template to include this hash into a link to a publicly exposed page that will validate the hash and find/activate the user, and finally log them in.

1) Has anyone else tried to do this before, and how did you approach this? Is there a better idea than my proposed solution?

2) Is there any official documentation around this that I might be missing here?

share|improve this question
up vote 3 down vote accepted

I've done pretty much exactly what you describe before. Rather than using the inactive flag, I used a custom Boolean to represent that the user had not self-validated, and used this to deny access upon login.

It seems the right approach to me and isn't much work. AFAIK there is no official support for user email validation for self-registered users but I can't point you to any docs on the subject.

share|improve this answer
Thanks for the prompt reply Jeremy, custom it is! – Boris Bachovski Aug 5 '14 at 3:45

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.