Enhance UserAdminUtils, remove warning
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / util / UserAdminUtils.java
index 2aa23b2d0023af4c25a4d687ca1830bd808bee95..83f3d0042d42bb17b1869864959774b4b2e500a5 100644 (file)
@@ -38,12 +38,17 @@ public class UserAdminUtils {
                return getLdapName(name);
        }
 
-       /** Retrieves the current logged-in user display name. */
+       /** Retrieves the current logged-in user mail */
        public static String getCurrentUserMail(UserAdmin userAdmin) {
                String username = CurrentUser.getUsername();
                return getUserMail(userAdmin, username);
        }
 
+       /** Retrieves the current logged-in user common name */
+       public final static String getCommonName(User user) {
+               return getProperty(user, LdapAttrs.cn.name());
+       }
+
        // OTHER USERS HELPERS
        /**
         * Retrieves the local id of a user or group, that is respectively the uid