Hi,
- Is there a solution for the mapping of the user’s middle name in the XWiki user’s property (profile)?
When creating users manually, I assigned a first_name = user’s first name and middle name. And Full name display OK!
- How to do this in the LDAP application settings?
LDAP mapping: first_name = givenName middleName does not work (see screenshot)
This kind of mapping is not supported right now. You can only map an LDAP field to a XWiki user property.
It would probably not be very hard to implement since we do this kind of combination in other places but it require some dev. You should create a feature request on Loading....
If you want to give it a try I can give you some pointers.
Many thanks!
I opened the request [LDAP-66].
If you have time, then I can try your solution on my test XWiki.
I meant if you want to implement this feature. I won’t have time to work on it anytime soon but I can help you find your way in the LDAP authenticator code.
I did not understand you correctly, OK, I am ready to listen to your hints.
The actual mapping is applied in ldap/ldap-authenticator/src/main/java/org/xwiki/contrib/ldap/XWikiLDAPUtils.java at master · xwiki-contrib/ldap · GitHub so I guess this method need to be rewritten to support pattern instead of simple names for the LDAP fields.
For the syntax I would use the same as in StrSubstitutor as in ldap/ldap-authenticator/src/main/java/org/xwiki/contrib/ldap/XWikiLDAPConfig.java at master · xwiki-contrib/ldap · GitHub (so for your example you would enter in the configuration first_name=${givenName} ${moddleName}
).
Thanks for the suggestion!
But I have a suspicion that the study of someone else’s code will take more time than the author of the code I’ll take a look, but I’m not sure.
Is it possible to solve the problem through XWiki UI in this way:
- In the user profile class add the middle_name property.
- In the LDAP settings for mapping user properties: middle_name = middleName.
In version 9.7, I managed to add a field and fill it in from LDAP. The middle_name property is displayed in the user profile (only in the profile).
- Where in XWiki UI can you say: first_name = first_name middle_name ?
And which forum thread should I ask specific questions about working with application code, setting up the development environment, downloading code from GitHub, etc.?
At the moment I installed the development environment IDEA and cloned the repository GitHub - xwiki-contrib/ldap: Various tools to manipulate LDAP servers in XWiki.. But I have a lot of code highlighted in red - not found classes, something else needs to be reloaded!
With pure Java and Web features did not work, only in terms of Android programming in Java: (
What dev documents to read in advance?