Wednesday, September 12, 2012

Working with Registration Receivers in Extranet Collaboration Manager for SharePoint 2010 (ExCM) – Part 2 – The “MembershipProfile” Receiver

By Matthew McBride

Extranet Collaboration Manager for SharePoint 2010 (ExCM) contains a framework called Registration Receivers that can be used to inject custom programming activities into the ExCM registration pipeline. In Part 1 of this series, we discussed the “SPUser” receiver and its function.
In this part, we will discuss the “MembershipProfile” receiver which is used to update the membership profile fields with the values provided by the user at the time of registration. Similar to the “SPUser” receiver, this feature modifies the behavior of your SharePoint Extranet site so that external users’ experience is more consistent with that of your internal users.

First, let’s take a look at what happens when the receiver is not used. I have simply commented out the RegistrationReceiver section of the web.config file:

Now I will create a new user with the Anonymous Registration link:

Note the values I supplied for First Name, Last Name, Company Name, Job Title, and Phone Number below:

After clicking “Finish” and successfully creating the user, I log back into the site using the System Account and navigate to the Extranet Users link:

Then I select the newly created user and then “View User” from the “Users” tab. Notice that the profile information is blank:

Next, I add the Registration Receivers back and create another user. Again, notice the values specified for the registration fields:

Now I'll log in and view the new user:

You’ll notice that the “MembershipProfile” receiver has taken the values I specified on the registration form and merged them into the user’s Account Profile. Extranet Users will now have profile information similar to internal users (whose information is pulled from Active Directory).