/ Published in: C#
![](/img/icon_sav.png?v3)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
public static class SecurityHelper { public static bool IsUserMemberOfGroup(SPUser user, string groupName) { bool result = false; if (!String.IsNullOrEmpty(groupName) && user != null) { foreach (SPGroup group in user.Groups) { if (group.Name == groupName) { // found it result = true; break; } } } return result; } }
Comments
![RSS Feed for Comments RSS Icon](/images/rss.png?v3)