Is it possible to set a default role when creating a new user through the backend interface?
I need to have a particular role being checked, by default.
Posted by Community Admin on 22-Jul-2014 00:00
You should map the UserCreate view and manipulate the RolesRepeater which holds the Roles and the Checkbox for each role selection. Using the codebehind of the mapped view, we can iterate the roles collection and find the one we need, then find the underlying checkbox and check it:
public partial class UserNew : System.Web.UI.UserControl
var rolesList = this.FindControl("rptRolesList") as Repeater;
if (rolesList != null)
var items = rolesList.DataSource as List<RoleProviderPair>;
if (items != null && items.Count > 0)
for (int i = 0; i < items.Count; i++)
if (items[i].RoleItem.Name == "Authors")
var checkBox = rolesList.Items[i].FindControl("role") as CheckBox;
if (checkBox != null)
checkBox.Checked = true;
The view is mapped from Administration -> Settings -> Advanced -> Controls -> ViewMap. Create New and add to HostType: Telerik.Sitefinity.Security.Web.UI.Principals.UserNewDialog, Telerik.Sitefinity, in LayoutTemplatePath set the path to the new template. Example.
I have attached the mapped view. Hope you find it helpful.
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items