Make security UI more robust
[lgpl/argeo-commons.git] / security / runtime / org.argeo.security.core / src / main / java / org / argeo / security / ldap / nature / SimpleUserNatureMapper.java
index bc20c9db8026909b3352ac417b0448a1ccfdd26a..681c5174a65b4029c3e0782fb597d29e07d88835 100644 (file)
@@ -44,7 +44,8 @@ public class SimpleUserNatureMapper implements UserNatureMapper {
                ctx.setAttributeValue("sn", nature.getLastName());
                ctx.setAttributeValue("givenName", nature.getFirstName());
                ctx.setAttributeValue("mail", nature.getEmail());
-               if (nature.getDescription() != null) {
+               if (nature.getDescription() != null
+                               && !nature.getDescription().equals("")) {
                        ctx.setAttributeValue("description", nature.getDescription());
                }
        }