User services
[lgpl/argeo-commons.git] / security / runtime / org.argeo.security.core / src / main / java / org / argeo / security / ldap / CoworkerUserNatureMapper.java
index 6fb0ef048ccf01ba8cfdf815c7a530d5c97f6286..47e80dc2e2d2d39f0968dc6e27ee59508cb29638 100644 (file)
@@ -13,11 +13,14 @@ public class CoworkerUserNatureMapper implements UserNatureMapper {
                basicUserInfo.setMobile(ctx.getStringAttribute("mobile"));
                basicUserInfo.setTelephoneNumber(ctx
                                .getStringAttribute("telephoneNumber"));
+               basicUserInfo.setUuid(ctx.getStringAttribute("employeeNumber"));
                return basicUserInfo;
        }
 
-       public void mapUserInfoToContext(UserNature userInfoArg, DirContextAdapter ctx) {
+       public void mapUserInfoToContext(UserNature userInfoArg,
+                       DirContextAdapter ctx) {
                CoworkerNature userInfo = (CoworkerNature) userInfoArg;
+               ctx.setAttributeValue("employeeNumber", userInfo.getUuid());
                if (userInfo.getDescription() != null) {
                        ctx.setAttributeValue("description", userInfo.getDescription());
                }