public List <UserInfo> GetGroupUsers(GroupInfo groupInfo)
        {
            var users = new List <UserInfo>();

            if (!AllDomainGroups.Any() && !TryLoadLDAPGroups())
            {
                return(users);
            }

            var domainGroup = AllDomainGroups.FirstOrDefault(lg => lg.Sid.Equals(groupInfo.Sid));

            if (domainGroup == null)
            {
                return(users);
            }

            if (domainGroup.Sid.EndsWith("-513"))
            {
                // Domain Users found

                //var ldapUsers = _ldapHelper.GetUsersByAttributesAndFilter(_settings, "(&(objectCategory=person)(objectClass=user)(primaryGroupID=513))");

                var ldapUsers = _ldapHelper.GetUsersFromPrimaryGroup(_settings, "513");

                if (ldapUsers == null)
                {
                    return(users);
                }

                foreach (var ldapUser in ldapUsers)
                {
                    var userInfo = CreateUserInfo(ldapUser);

                    if (!users.Exists(u => u.Sid == userInfo.Sid))
                    {
                        users.Add(userInfo);
                    }
                }
            }
            else
            {
                var members = _ldapHelper.GetGroupAttribute(domainGroup, _settings.GroupAttribute);

                if (members == null)
                {
                    return(users);
                }

                foreach (var member in members)
                {
                    var ldapUser = FindUserByMember(member);

                    if (ldapUser != null)
                    {
                        var userInfo = CreateUserInfo(ldapUser);

                        if (!users.Exists(u => u.Sid == userInfo.Sid))
                        {
                            users.Add(userInfo);
                        }
                    }
                }
            }

            return(users);
        }