Move description field
[lgpl/argeo-commons.git] / security / runtime / org.argeo.security.core / src / main / java / org / argeo / security / ldap / nature / CoworkerUserNatureMapper.java
index 0ea573ccbbac5549fa10924096687d1d3ced111f..815170a6a8bece078aaabf3fb014682b7cf8c158 100644 (file)
@@ -10,11 +10,10 @@ public class CoworkerUserNatureMapper implements UserNatureMapper {
 
        public UserNature mapUserInfoFromContext(DirContextOperations ctx) {
                CoworkerNature nature = new CoworkerNature();
-               nature.setDescription(ctx.getStringAttribute("description"));
                nature.setMobile(ctx.getStringAttribute("mobile"));
                nature.setTelephoneNumber(ctx.getStringAttribute("telephoneNumber"));
 
-               if (nature.getDescription() == null && nature.getMobile() == null
+               if (nature.getMobile() == null
                                && nature.getTelephoneNumber() == null)
                        return null;
                else
@@ -24,9 +23,6 @@ public class CoworkerUserNatureMapper implements UserNatureMapper {
        public void mapUserInfoToContext(UserNature userInfoArg,
                        DirContextAdapter ctx) {
                CoworkerNature nature = (CoworkerNature) userInfoArg;
-               if (nature.getDescription() != null) {
-                       ctx.setAttributeValue("description", nature.getDescription());
-               }
                if (nature.getMobile() == null || !nature.getMobile().equals("")) {
                        ctx.setAttributeValue("mobile", nature.getMobile());
                }