Recently we encountered an issue in Sitecore user manager. We have more than 500k users, while trying to find any specific user, it was troublesome to get the right user. We were thinking if we could filter users by domain then it will be easier to find the right user.

We started with “UserManager.aspx” which is located under the path “\Website\sitecore\shell\Applications\Security\UserManager\UserManager.aspx”.

We decided not to touch the original file rather copied and created “UserManagerCustom.aspx”. We kept the file in our project and maintained the same folder structure of the path.

We modified the ASPX file inheritance to target our code-behind file

In the code behind, we override the OnLoad event of the UserManager class. We can get the code of the UserManager class from Sitecore.Client.dll -> Sitecore.Shell.Applications.Security.UserManager.

We have added the following line to filter domain

The IsAllowedDomain method looks like the following. The domain name (ExcludedDomainInUserManager) can be configured in the Web.config file.

Now we placed the “UserManagerCustom.aspx” file in the following directory:

The last task is to modify the path in “Core”, path is (/sitecore/layout/Layouts/Security/SecurityManager)

Now if we browse the User Manager it will show users filtered by the domain we configured in the web.config.


Previous post Dependency Inversion Principle and the Dependency Injection Pattern
Sitecore EXM Next post Remove Sitecore users in bulk