Hi everyone,
In a large XWiki instance it is possible to have multiple users with the same or very similar name. This can lead to mistakes (e.g. selecting the wrong user) when using the user picker because we are currently displaying only the avatar and user full name. I’m trying to fix this with Loading... . The idea is to:
- add a new configuration property whose value is the name of a user property (from XWikiUsers class)
- show the value of the configured user property as hint in the user picker (or anywhere we display the user in a compact mode: e.g.
#displayUser
Velocity macro,useravatar
macro, etc.)
For the first point I propose to:
- add a new configuration property in
xwiki.properties
, nameduser.display.qualifierProperty
- add a new method to xwiki-platform/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-api/src/main/java/org/xwiki/user/UserConfiguration.java at master · xwiki/xwiki-platform · GitHub , say
getUserQualifierProperty()
- add a new method to xwiki-platform/xwiki-platform-core/xwiki-platform-user/xwiki-platform-user-script/src/main/java/org/xwiki/user/script/UserScriptService.java at master · xwiki/xwiki-platform · GitHub to expose the configuration:
getConfiguration()
, returningUserConfiguration
.
This would allow me to use $services.user.configuration.userQualifierProperty
to access the configured user property name.
WDYT?
Thanks,
Marius