Sitecore allows you to manage a user’s profile in the User Manager. The fields for the user’s profile comes from the User
template found in the Core
database at /sitecore/templates/System/Security/User
. While developing a proof of concept, I found that if you create your own user profile template and inherit from the built-in User
template, fields from the base template do not appear in the User Manager.
It’s easy to create a custom profile in Sitecore. Swap over to the Core
database and create a new item under /sitecore/templates/My Templates
from the /System/Templates/Template
template. Add some fields to your custom template:
Update your template to inherit from the /sitecore/templates/System/Security/User
template:
Still in the Core
database, create an item under /sitecore/system/Settings/Security/Profiles
from the template you created. This allows you to select your new profile in the User Manager. Note that order of items in this folder affects how profiles will display in the User Manager–if you put your new profile first, it will be used by default for all new users you create.
Open up the User Manager and create a new user. Select your new profile for your user and open the User Editor. If you switch over to the Profile tab you’ll notice that only the fields from your custom profile template appear, but none of the fields from the base User
template are visible.
I reported this issue to Sitecore and they acknowledged it as a bug. Sitecore gave this bug public reference number 91988. Please use this reference number if you contact Sitecore about this issue.
I’ve personally confirmed that the issue affects Sitecore 8.0 Initial Release all the way through Sitecore 8.2 Update-2.
Sitecore’s Support Team, awesome as they are, quickly created a patch for this issue. The patch can be found on GitHub here: https://github.com/SitecoreSupport/Sitecore.Support.91988/. As of this post, the patch on GitHub has only been officially tested against Sitecore 8.1 Update-2 and Sitecore 8.2 Update-2. If you are using a different version of Sitecore, check with Sitecore Support to get an appropriate version of the patch. Never apply Sitecore patches without first contacting Sitecore Support.
The patch makes changes to the EditUserPage
control to filter out fields from the Standard Template, but allows fields from base templates to display. In lieu of the patch, the only other workaround is to add custom fields directly to the built-in User
template. After applying the patch, fields from base templates appear:
I love that Sitecore puts their patches up on GitHub now. Have you been affected by this issue? Let me know in the comments.