Ejemplo n.º 1
0
        void UserEditControl1_Created(object sender, UserEditEventArgs e)
        {
            var role = SecurityContext.Current.DefaultRole;

            if (!string.IsNullOrEmpty(role))
            {
                // Make sure user have access to Social part of website.
                System.Web.Security.Roles.AddUserToRole(e.User.UserName, role);
            }
        }
Ejemplo n.º 2
0
 void UserEditControl1_Created(object sender, UserEditEventArgs e)
 {
     // Make sure user have access to Social part of website.
     System.Web.Security.Roles.AddUserToRole(e.User.UserName, "SocialUsers");
 }