Welcome to plsql4all.blogspot.com SQL, MYSQL, ORACLE, TERADATA, MONGODB, MARIADB, GREENPLUM, DB2, POSTGRESQL.

Sunday 22 June 2014

Check current User is MemberofGroup or Not?

        SPGroupCollection groupColl = SPContext.Current.Web.SiteGroups;
            SPGroup grp = groupColl["grp1"];
            if (SPContext.Current.Web.IsCurrentUserMemberOfGroup(grp.ID))
                GRP = grp1;
            else
                GRP = "grp2";

No comments:

Post a Comment

Please provide your feedback in the comments section above. Please don't forget to follow.