What if I override the FillSearch function with the same exact code found in the LDAPCP base class function, but instead of adding every returned user to the searchtree hierarchy, I ignore those that are not in the site collection? Would that not work?
// On purpose, if this property is true, LDAP lookp is completely bypassed
List<PickerEntity> entities = CreatePickerEntityForSpecificClaimTypes(
input,
attributes.FindAll(x => !x.CreateAsIdentityClaim),
false
);
if (results != null && results.Count > 0)
{
foreach (var result in results)
{
}
// On purpose, if this property is true, LDAP lookp is completely bypassed
List<PickerEntity> entities = CreatePickerEntityForSpecificClaimTypes(
input,
attributes.FindAll(x => !x.CreateAsIdentityClaim),
false
);
if (results != null && results.Count > 0)
{
foreach (var result in results)
{
__# Check if current user exists in site collection. If true, execute__:
matchNode.AddEntity(entity);
}}