In AEM6.2, when LDAP users log in and go to /welcome.html, the Classic UI Welcome screen shows their full LDAP DN next to the "sign-out" link on the upper right of the screen.
This is an issue with Classic UI in AEM6.2.
To fix this problem, you can modify the product code by adding an overlay of welcome.jsp.
When users log in, they see their full names displayed.
[1]
org.apache.jackrabbit.api.security.user.UserManager userManager = resourceResolver.adaptTo(org.apache.jackrabbit.api.security.user.UserManager.class); org.apache.jackrabbit.api.security.user.Authorizable authorizable = userManager.getAuthorizable(auth.getPrincipal()); if (authorizable.hasProperty("profile/familyName")) { name = authorizable.getProperty("profile/familyName")[0].getString(); } if (authorizable.hasProperty("profile/givenName")) { name = authorizable.getProperty("profile/givenName")[0].getString() + ((name.length() > 0)?" " + name:""); }
[2]
String name = auth == null ? null : auth.getPrincipal().getName(); if (name == null) { // workaround if user manager service is not ready yet. name = session.getUserID(); }
Hämta
Logga in på ditt konto