ArrayList attributes = new ArrayList();
if (user.getCreatedDate() != null)
{
attributes.add(new SimpleAttribute(USER_CREATED_DATE, dateFormat.format(user.getCreatedDate())));
}
if (user.getLastLoginTime() != null)
{
attributes.add(new SimpleAttribute(USER_LAST_LOGIN_TIME, dateFormat.format(user.getLastLoginTime())));
}
if (user.getEmail() != null)
{
attributes.add(new SimpleAttribute(USER_EMAIL, user.getEmail()));
}
if (user.getFirstName() != null)
{
attributes.add(new SimpleAttribute(USER_FIRST_NAME, user.getFirstName()));
}
if (user.getLastName() != null)
{
attributes.add(new SimpleAttribute(USER_LAST_NAME, user.getLastName()));
}
if (user.getOrganizationId() != null)
{
attributes.add(new SimpleAttribute(USER_ORGANIZATION_ID, user.getOrganizationId()));
}
if (user.getPassword() != null)
{
if (orgService.getConfiguration().isPasswordAsAttribute())
{
attributes.add(new SimpleAttribute(USER_PASSWORD, user.getPassword()));
}
else
{
try
{