KEYCLOAK-7194: avoid NullPointerException (#5157)
This commit is contained in:
parent
c3c1a0fb4e
commit
5e4d173f1d
1 changed files with 4 additions and 1 deletions
|
@ -561,7 +561,10 @@ public class LDAPStorageProviderFactory implements UserStorageProviderFactory<LD
|
|||
LDAPStorageMapper ldapMapper = ldapFedProvider.getMapperManager().getMapper(mapperModel);
|
||||
ldapMapper.onImportUserFromLDAP(ldapUser, currentUser, currentRealm, false);
|
||||
}
|
||||
session.userCache().evict(currentRealm, currentUser);
|
||||
UserCache userCache = session.userCache();
|
||||
if (userCache != null) {
|
||||
userCache.evict(currentRealm, currentUser);
|
||||
}
|
||||
logger.debugf("Updated user from LDAP: %s", currentUser.getUsername());
|
||||
syncResult.increaseUpdated();
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue