From 704a993e37fc02b4dda0f0e683af4c9572ed51c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Friedrich=20Dreyer?= Date: Tue, 21 Jun 2016 16:30:48 +0200 Subject: [PATCH] Fix null pointer exception in user_ldap (#25062) --- apps/user_ldap/lib/Access.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/user_ldap/lib/Access.php b/apps/user_ldap/lib/Access.php index daeb7d942a4..4d0753696ff 100644 --- a/apps/user_ldap/lib/Access.php +++ b/apps/user_ldap/lib/Access.php @@ -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'] + ); + } } } -- 2.39.5