This project has moved and is read-only. For the latest updates, please go here.

How to avoid Parenthesis (email) to be shown?

Oct 22, 2015 at 12:02 PM
Edited Oct 22, 2015 at 1:03 PM
Hello Yvand,

How to avoid Parenthesis (email) to be shown in the picker?

I found in the code:

// If input is resolved by an attribute linked to identity claim type (typically displayName and cn attributes), show its value in parenthesis.
    this.CurrentConfiguration.DisplayLdapMatchForIdentityClaimTypeProp = true;
I changed it to false, but the parenthesis stuff remains.

Is there another place to modify something to hide this?

Now some users are there in double. Can this possibly come from the fact that I added ',LDAPAttributeToDisplayProp="displayName"' on each properties?

Thank you.
Oct 22, 2015 at 4:23 PM
Hello Claude,
indeed if the claim type is not the identity claim type, then its name associated will display in parenthesis.
But as a developer you have an easy way to customize it: you can override method FormatPermissionDisplayText in your inherited class to format the display text exactly as you want.
Just make sure you call the base method when you don't want to change what's incoming.
Oct 22, 2015 at 5:35 PM
Edited Oct 22, 2015 at 5:42 PM
Thank you Yvand,

Funny thing is if I do it like this:
    protected override string FormatPermissionDisplayText(string claimType, string claimValue, bool isIdentityClaimType, ConsolidatedResult result) {
        return "tutu"; // base.FormatPermissionDisplayText( claimType,  claimValue,  isIdentityClaimType,  result);
...not all user found are equals (<- see the pscreen) to "tutu", just 2 on 4! Which means there are another place where is formated those users...

...after som test I noticed that for some users there are 2 tutu and 2 'normal' users and for other users there are only 2 tutu and no other users. What do you think of this? As if it depends on the user running the request.

Kind regards.
Oct 26, 2015 at 1:07 PM
in the 1st screenshot, results above the horizontal bar come from the local cache of IE, they were not actually created by LDAPCP, which is why they don't appear as "tutu".
See blog post for further détails to disable it.
Oct 30, 2015 at 9:55 AM
Thank you Yvand, seems the reason.
Marked as answer by csiefers on 10/30/2015 at 1:56 AM