public IList<string> GetAllUserGroups(string url)
{
IList<string> groupList = new List<string>();
using (SPSite site = new SPSite(url))
{
SPGroupCollection groups = site.RootWeb.SiteGroups;
foreach (SPGroup g in groups)
{
groupList.Add(g.Name);
}
}
return groupList;
}
0 comments:
Post a Comment