if (user.getPassword() != null) {
if (orgService.getConfiguration().isPasswordAsAttribute()) {
attributes.add(new SimpleAttribute(USER_PASSWORD, user.getPassword()));
} else {
try {
am.updatePassword(session.getPersistenceManager().findUser(user.getUserName()), user.getPassword());
} catch (IdentityException e) {
handleException("Cannot update password: " + user.getUserName() + "; ", e);
}
}