Beispiel #1
0
        public void SetRolesOnUser(string roleNamesCommaSeparated, string userId)
        {
            List <string> roleNames = new List <string>();

            if (roleNamesCommaSeparated != null && roleNamesCommaSeparated.Length > 0)
            {
                roleNames = new List <string>(roleNamesCommaSeparated.Split(','));
            }
            ApplicationRole.SetRolesOnUser(roleNames, userId, userManager);
        }