string CurrentSiteURL = "http://gildevbox3:10866/";
string currentUser="user1";
try
{
SPSecurity.
{
using (SPSite site = new SPSite(CurrentSiteURL))
{
using (SPWeb web = site.RootWeb)
{
SPUser user = web.EnsureUser(currentUser);
foreach(SPGroup group in web.Groups)
{
if (group.Name.ToLower() == "Study Owner".ToLower())
{
}
}
}
}
});
}
catch
{
}
No comments:
Post a Comment