FindUsers() public method

public FindUsers ( string searchCriteria ) : List
searchCriteria string
return List
Ejemplo n.º 1
0
 static void Main(string[] args)
 {
     var adTools = new ActiveDirectory();
     var users = adTools.FindUsers("cal");
     foreach (var user in users)
     {
         Console.WriteLine(string.Format("user - {0}",user));
     }
 }
Ejemplo n.º 2
0
        protected override void FillResolve(Uri context, string[] entityTypes, string resolveInput, List<PickerEntity> resolved)
        {
            if (!EntityTypesContain(entityTypes, SPClaimEntityTypes.FormsRole))
                return;

            var adTools = new ActiveDirectory();
            var users = adTools.FindUsers(resolveInput.ToLower());

            foreach (var user in users)
            {
                resolved.Add(GetPickerEntity(user));
            }
        }
Ejemplo n.º 3
0
        protected override void FillSearch(Uri context, string[] entityTypes,string searchPattern, string hierarchyNodeID, int maxCount,SPProviderHierarchyTree searchTree)
        {
            // Ensure that People Picker is asking for the type of entity that we
            // return; site collection administrator will not return, for example.
            if (!EntityTypesContain(entityTypes, SPClaimEntityTypes.FormsRole))
                return;

            // The counter to track what node we are in; it will be used to call into
            // our helper arrays that were covered in part 1 and part 2 of this article.
            int teamNode = -1;

            SPProviderHierarchyNode matchNode = null;
            //Query ActiveDirectory for a user or a group with a name like the search string
            var adTools = new ActiveDirectory();
            var users = adTools.FindUsers(searchPattern);

            foreach (var user in users)
            {
                matchNode.AddEntity(GetPickerEntity(user));
            }
        }
Ejemplo n.º 4
0
        protected override void FillResolve(Uri context, string[] entityTypes, SPClaim resolveInput, List<PickerEntity> resolved)
        {
            // Ensure that People Picker is asking for the type of entity that we
            // return; site collection administrator will not return, for example.
            if (!EntityTypesContain(entityTypes, SPClaimEntityTypes.FormsRole))
            return;

            var adTools = new ActiveDirectory();
            var users = adTools.FindUsers(resolveInput.Value.ToLower());

            foreach (var user in users)
            {
                resolved.Add(GetPickerEntity(user));
            }
        }