diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-04 16:56:59 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2016-04-04 16:56:59 +0200 |
commit | f6b846584b69c46a93e1bdb83160b506d4e9a4c1 (patch) | |
tree | e138186db61a2076a732c7e582db5139cbfac629 /apps/user_ldap/lib/user | |
parent | 6ecd1d9e86dc3f2b70da1071a13f661702627624 (diff) | |
download | nextcloud-server-f6b846584b69c46a93e1bdb83160b506d4e9a4c1.tar.gz nextcloud-server-f6b846584b69c46a93e1bdb83160b506d4e9a4c1.zip |
Handle case where the user is not known - fixes #23759
Diffstat (limited to 'apps/user_ldap/lib/user')
-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); + } } } |