diff options
author | Lukas Reschke <lukas@owncloud.com> | 2016-04-06 12:58:08 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2016-04-06 12:58:08 +0200 |
commit | e2ea289943b3ec26da9fa7d8332307a54a2c6790 (patch) | |
tree | a6026fcd06ebd32e99c3f9a700e8ccaaff24dbac /apps | |
parent | de122a9b048eca2ecf24abacb0f9bf0f4f57047b (diff) | |
parent | f6b846584b69c46a93e1bdb83160b506d4e9a4c1 (diff) | |
download | nextcloud-server-e2ea289943b3ec26da9fa7d8332307a54a2c6790.tar.gz nextcloud-server-e2ea289943b3ec26da9fa7d8332307a54a2c6790.zip |
Merge pull request #23777 from owncloud/ldap-null-user
Handle case where the user is not known
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/user/user.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/apps/user_ldap/lib/user/user.php b/apps/user_ldap/lib/user/user.php index 9bf505c5c22..23aba0e0d85 100644 --- a/apps/user_ldap/lib/user/user.php +++ b/apps/user_ldap/lib/user/user.php @@ -24,12 +24,12 @@ namespace OCA\user_ldap\lib\user; -use OCA\user_ldap\lib\user\IUserTools; use OCA\user_ldap\lib\Connection; use OCA\user_ldap\lib\FilesystemHelper; use OCA\user_ldap\lib\LogWrapper; use OCP\IAvatarManager; use OCP\IConfig; +use OCP\Image; use OCP\IUserManager; /** @@ -55,7 +55,7 @@ class User { */ protected $fs; /** - * @var \OCP\Image + * @var Image */ protected $image; /** @@ -101,13 +101,13 @@ class User { * LDAP interaction * @param IConfig $config * @param FilesystemHelper $fs - * @param \OCP\Image $image any empty instance + * @param Image $image any empty instance * @param LogWrapper $log * @param IAvatarManager $avatarManager * @param IUserManager $userManager */ public function __construct($username, $dn, IUserTools $access, - IConfig $config, FilesystemHelper $fs, \OCP\Image $image, + IConfig $config, FilesystemHelper $fs, Image $image, LogWrapper $log, IAvatarManager $avatarManager, IUserManager $userManager) { $this->access = $access; @@ -432,7 +432,9 @@ class User { } if(!is_null($email)) { $user = $this->userManager->get($this->uid); - $user->setEMailAddress($email); + if (!is_null($user)) { + $user->setEMailAddress($email); + } } } |