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:
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:
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:
http://siteurl/_catalogs/users/simple.aspx
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 “FBAAdmin@demo.com” 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
“RegReceiver@demo.com” 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).