Friday, August 31, 2012

Working with Registration Receivers in Extranet Collaboration Manager ExCM 2010 – Part 1 – The “SPUser” Receiver

By Matthew McBride

Extranet Collaboration Manager (ExCM) 2010 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, I will discuss the “SPUser” receiver.

Registration Receivers are configured at the web.config level, so they are global to the Web Application on which they are configured. By default, we provide two different receiver examples:

The “SPUser” receiver can enhance the experience for your SharePointExtranet Users by making your site appear consistent to both internal and external users. It replaces the “Title” field with a user’s full name rather than their username. Let’s take a look at the default behavior on an Forms Based SharePoint site and how the “SPUser” receiver improves that behavior.

Before we begin, let's briefly touch on the data that the receiver modifies. The "Title" field I referred to earlier is part of the SharePoint User Information List. If you've never heard it, that's probably because it is completely hidden and only accessible by administrators. The User Information List stores information about a user using metadata such as Picture, Email, DisplayName, LoginName, etc. The User Information List can be accessed via the browser by navigating to:

Mine looks like this:

The first thing to keep in mind is that Registration Receivers only occur at the time of registration. That means a registration has to occur and be successful before the receivers are applied. This is important because any users that are manually created will not have the receiver activity run against them.

First, I will manually create an FBA Administrator account named “” in the “Extranet Users” section of our management menu:

After logging in as the new user, this is what I see in the upper right hand corner:
By default, SharePoint takes the username and displays it here as the “Title” for the user. Since we have set the attribute in the web.config file to use the e-mail address as the username, we see the users’ e-mail address.
Now, I will create a new user named “” by using the Anonymous Registration feature so we can see how the “SPUser” receiver modifies the “Title” filed:

After signing in as this new user, I now see this as my “Title” in the upper corner:
So the “SPUser” receiver has taken the values I provided for First Name and Last Name at the time of registration, concatenated them, and replaced the default value (username) used by the “Title” field. This creates a more consistent experience for all of your site users because now both internal and external users will see their full name in this area (assuming the AD username scheme also follows the “First Name, Last Name” format).