In some cases it may be desired to inject custom behavior into the ExCM registration process. The ExCM registration page allows this by exposing two events that can be overridden to include custom operations.
To modify the ExCM registration behavior you can add custom actions by using the registration events: OnRegistering, OnRegistered. To use a custom event add the following lines to the register.aspx page found in ‘12\Template\Layouts\SPSolutions\Delegation’ and modify the method contents to include the desired events. Advanced modifications may be added using a separate .NET assembly.
![]() |
Be sure to make a backup copy of the original register.aspx page before making changes. |
| Registration Event Samples | Copy Code |
|---|---|
|
<script runat=””> protected override void OnRegistering(RegistrationEventProperties eventProperties) { if(eventProperties.UserName.Length < 8) { eventProperties.ErrorMessage = "You user name must be 8 characters."; eventProperties.Cancel = true; } } protected override void OnRegistered(RegistrationEventProperties eventProperties) { // Update internal name eventProperties.Profile["FullName"] = String.Format( "{0} {1}", eventProperties.Profile["FirstName"], eventProperties.Profile["LastName"]); // Save profile eventProperties.Profile.Save(); } </script> | |
