About Me

Having 12 years experience in Microsoft technologies.Since more than 7 years working in SharePoint technologies. Expert in providing consultation for SharePoint projects. Hands on with development and administration.

Wednesday 11 December 2013

Check SharePoint user in the SharePoint Group

public static bool IsMemberInGroup(string groupName)
        {
            bool isMember = false; ;

            try
            {
                isMember = SPContext.Current.Web.IsCurrentUserMemberOfGroup(SPContext.Current.Web.Groups[groupName].ID);
            }
            catch (Exception ex)
            {

            }
            return isMember;

        }

No comments:

Post a Comment