Take the 2-minute tour ×
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It's 100% free, no registration required.

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

1 Answer 1

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! –  Bachovski Aug 5 at 3:45

Your Answer

 
discard

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.