This project has moved. For the latest updates, please go here.

How to avoid Parenthesis (email) to be shown?

Oct 22, 2015 at 11:02 AM
Edited Oct 22, 2015 at 12: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.
Claude
Coordinator
Oct 22, 2015 at 3: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.
thanks,
Yvan
Oct 22, 2015 at 4:35 PM
Edited Oct 22, 2015 at 4: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.
Claude
Coordinator
Oct 26, 2015 at 12:07 PM
Hello,
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 http://blogs.technet.com/b/sheyia/archive/2014/06/11/how-to-clear-the-sharepoint-2013-client-side-people-picker-cache.aspx for further détails to disable it.
thanks,
Yvan
Oct 30, 2015 at 8:55 AM
Thank you Yvand, seems the reason.
Marked as answer by csiefers on 10/30/2015 at 1:56 AM