/ Published in: C#
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; } }