Member Registration in Umbraco 9
In this article, we will look into Member Registration in Umbraco 9.

Umbraco 9 makes use of ASP.NET Core Identity for both backoffice users and website members. With previous versions of Umbraco, we had the MembershipHelper
that was handy for accessing member data as IPublishedContent
. The helper is available in Umbraco 9 as well. It contains a variety of helper methods that can be used in views and controllers. Umbraco 9 also comes with an interface IMemberManager
that can help access member data as MemberIdentityUser
.
Let us start with the view model for registration, the code is as shown below.
Now we need a ViewComponent to build up the form. The ViewComponent passes an instance of the RegisterViewModel to my view.
The View(Default.cshtml
) for this ViewComponent is in the folder ~/Views/Components/Register
. This is a bit of convention followed for ViewComponents. The code for the view is as shown below.
I have a document type called Register
which has a default template by the same name. It is a very basic document type. I can invoke my ViewComponent in the template as shown below.
The view posts back to an action called Register
in the AccountSurfaceController
. So let us have a look at the code for the action.
I am heavily making use of the IMemberManager
interface in my code as you can see. I have also added some TempData
goodness to show any messages to the end user.
Understanding the concepts behind asynchronous messaging
Understanding the concepts behind asynchronous messaging