Try our conversational search powered by Generative AI!

AspnetIdentity - ApplicationUserProvider<TUser>


We are importing an existing user base to our new episerver project.  The legacy cms had a salt value per user row, so I created a custom application user and introduced teh additional property of Salt value.

All is implemented fine, but I am having some problems with the above class, the abstract CreateUser method defines a fixed number of arguments, so I cant add my new salt value method.  One work around I had thought of was to perform an update immediately after creation with the salt value, not ideal but it would work.  However, I would like the admin users to still be able to use the create user facility in the backend and this will only make use of createuser method with no salt value.

Is there a way to replace the create user method globally, or alter the admin ui create user function to also perform the additional update?

Aug 02, 2017 17:33
- Mar 03, 2020 7:29
Hi Adam,
Can you guide me how did you created a custom application user. Any reference.


Hello Adam

This may be able to help:

Aug 02, 2017 22:56

hi David, fantastic!  Thats exactly what I needed, thank you :)

Aug 03, 2017 18:39

Hi Adam

Thats great news! If you find it useful can you mark as answered so other members of the community can benefit from the answer :)?


Aug 04, 2017 10:11

No problem.

What i did in the end was completely intercept the createuser call only and implemented the extra field.  To be able to do that you need to set the return value of the intercept and you will need an instance of the application user manager.  Currently I have implemented identity as per the alloy example, so its not instantiated through DI, in which case I got my instance of applicatioin user manager by injecting the httpcontext and passing an instance of the OwinContext to create an instance of application user manager (typed to my user).

If you have a multi user type (in terms of class, not role) then you might want to specify the type of UiUserProvider when declaring the intercept, for my example we only have the one type of user class so this wasnt necessary.

Edited, Aug 04, 2017 13:26

Thanks for sharing your experience Adam! Happy inercepting :)

Aug 04, 2017 13:31
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.