Manipulate user / group option in search user / group dialogs
I recently needed to block the user / group option in the membership dialogs to only have the group option.
I guess that it’s not a very common scenario but maybe it will be helpful to someone so here we go.
The search user / group dialog in edit mode is called MembershipBrowser.aspx and is located in the \Application\UI\Edit folder.
In admin mode the dialog is called SearchUsers.aspx in is located in \Application\UI\Edit folder.
Just add the code just before the last closing </asp:content> tag. Setting the selected dropdown to 1 means group and 0 users.
To get this to work in EPiServer you either make the changes directly in the files but that’s not recomended because they can be overwritten with a sp or so.
A better (but not great) way is to make copies of the files and add them your project and then use virtualpathmappings to redirect EPiServer to the new copies.