KEYCLOAK-13339 NPE when removing credentials and user cache is disabled
This commit is contained in:
parent
6f62c0ed98
commit
75acc27706
1 changed files with 4 additions and 1 deletions
|
@ -74,7 +74,10 @@ public class UserCredentialStoreManager implements UserCredentialManager, OnUser
|
|||
public boolean removeStoredCredential(RealmModel realm, UserModel user, String id) {
|
||||
throwExceptionIfInvalidUser(user);
|
||||
boolean removalResult = getStoreForUser(user).removeStoredCredential(realm, user, id);
|
||||
session.userCache().evict(realm, user);
|
||||
UserCache userCache = session.userCache();
|
||||
if (userCache != null) {
|
||||
userCache.evict(realm, user);
|
||||
}
|
||||
return removalResult;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue