User services
[lgpl/argeo-commons.git] / security / runtime / org.argeo.security.core / src / main / java / org / argeo / security / ldap / SimpleUserNatureMapper.java
index 6a6bab3c786b5cbf783271f645aa7fe0de81f59d..2a210910c8511584e23b483fc4762af2e61bade8 100644 (file)
@@ -12,6 +12,7 @@ public class SimpleUserNatureMapper implements UserNatureMapper {
                basicUserInfo.setLastName(ctx.getStringAttribute("sn"));
                basicUserInfo.setFirstName(ctx.getStringAttribute("givenName"));
                basicUserInfo.setEmail(ctx.getStringAttribute("mail"));
+               basicUserInfo.setUuid(ctx.getStringAttribute("seeAlso"));
                return basicUserInfo;
        }
 
@@ -23,6 +24,8 @@ public class SimpleUserNatureMapper implements UserNatureMapper {
                ctx.setAttributeValue("sn", userInfo.getLastName());
                ctx.setAttributeValue("givenName", userInfo.getFirstName());
                ctx.setAttributeValue("mail", userInfo.getEmail());
+               // TODO: find a cleaner way?
+               ctx.setAttributeValue("seeAlso", userInfo.getUuid());
        }
 
        public Boolean supports(UserNature userInfo) {