// User authenticated but not yet existing - create as new OLAT user
ldapManager.createAndPersistUser(attrs);
identity = ldapManager.findIdentyByLdapAuthentication(username, ldapError);
} else {
// User does already exist - just sync attributes
Map<String, String> olatProToSync = ldapManager.prepareUserPropertyForSync(attrs, identity);
if (olatProToSync != null) {
ldapManager.syncUser(olatProToSync, identity);
}
}
// Add or update an OLAT authentication token for this user if configured in the module