Monday, August 18, 2014

Get all users from the sharepoint group


public static string GetAllGroupUsers(string GroupName)
        {
            string userList = string.Empty;

            SPSite spSite = new SPSite(SPContext.Current.Site.ID);
            using (SPWeb spWeb = spSite.RootWeb)
            {
                try
                {
                    SPGroup spGroup = spWeb.SiteGroups[GroupName];
                    if (spGroup != null)
                    {
                        foreach (SPUser spUser in spGroup.Users)
                        {
                            userList += spUser.Email + ";";
                        }
                    }
                }
                catch (Exception ex)
                {
                   
                }
            }
            return userList;
        }

No comments:

Post a Comment

Image noise comparison methods

 1. using reference image technique     - peak_signal_noise_ratio (PSNR)     - SSI 2. non-reference image technique     - BRISQUE python pac...