}
}
JSUserAttributes attributes = jsuser.getUserInfo();
if (attributes != null)
{
SecurityAttributes userSecAttrs = user.getSecurityAttributes();
for (JSNVPElement element : attributes.getValues())
{
// assume old-style user info comes from 2.1.X exports: convert
// user info keys into equivalent 2.2.X security attribute keys
String userInfoKey = element.getKey();
String securityAttributeKey = userInfoKey;
if (userInfoKey.equals(USER_INFO_SUBSITE))
{
securityAttributeKey = User.JETSPEED_USER_SUBSITE_ATTRIBUTE;
}
String securityAttributeValue = element.getValue();
// set security attribute
userSecAttrs.getAttribute(securityAttributeKey, true).setStringValue(securityAttributeValue);
}
}
JSNVPElements jsNVP = jsuser.getSecurityAttributes();
if ((jsNVP != null) && (jsNVP.getValues() != null))
{
SecurityAttributes userSecAttrs = user.getSecurityAttributes();
for (JSNVPElement element : jsNVP.getValues())
{
userSecAttrs.getAttribute(element.getKey(), true).setStringValue(element.getValue());
}
}
refs.getPrincipalMap(JetspeedPrincipalType.USER).put(jsuser.getName(), user);
userManager.updateUser(user);
}