Skip to content
Snippets Groups Projects
Commit 169465f2 authored by srosse's avatar srosse
Browse files

OO-3051: check if the user was created before filling the cache

parent e950381a
No related branches found
No related tags found
No related merge requests found
......@@ -1228,7 +1228,7 @@ public class LDAPLoginManagerImpl implements LDAPLoginManager, GenericEventListe
try {
newCount++;
Identity identity = createAndPersistUser(userAttrs);
if(StringHelper.containsNonWhitespace(ldapUser.getDn())) {
if(identity != null && StringHelper.containsNonWhitespace(ldapUser.getDn())) {
dnToIdentityKeyMap.put(ldapUser.getDn(), ldapUser);
ldapUser.setCachedIdentity(new IdentityRefImpl(identity.getKey()));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment