]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix null pointer exception in user_ldap (#25062)
authorJörn Friedrich Dreyer <jfd@butonic.de>
Tue, 21 Jun 2016 14:30:48 +0000 (16:30 +0200)
committerThomas Müller <DeepDiver1975@users.noreply.github.com>
Tue, 21 Jun 2016 14:30:48 +0000 (16:30 +0200)
apps/user_ldap/lib/Access.php

index daeb7d942a48dafa8fb15d074bf8dbd6bd2e0c40..4d0753696ffefea8d70a0ac8f3f30e95178bbe46 100644 (file)
@@ -732,7 +732,14 @@ class Access extends LDAPUtility implements IUserTools {
                                $user->unmark();
                                $user = $this->userManager->get($ocName);
                        }
-                       $user->processAttributes($userRecord);
+                       if ($user !== null) {
+                               $user->processAttributes($userRecord);
+                       } else {
+                               \OC::$server->getLogger()->debug(
+                                       "The ldap user manager returned null for $ocName",
+                                       ['app'=>'user_ldap']
+                               );
+                       }
                }
        }