diff options
author | Joas Schilling <coding@schilljs.com> | 2016-10-06 11:21:43 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-10-06 11:21:43 +0200 |
commit | 82c29e120404d8fe731e766c1fcd072072765943 (patch) | |
tree | 469b7004973df70a9f54caeda7fa186410ca6acb /apps | |
parent | 0ae9a2c9fefb16be52362826c8981e4efe2fa878 (diff) | |
download | nextcloud-server-82c29e120404d8fe731e766c1fcd072072765943.tar.gz nextcloud-server-82c29e120404d8fe731e766c1fcd072072765943.zip |
Log the error with display name
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/User/User.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/User/User.php b/apps/user_ldap/lib/User/User.php index 51fd577104c..b2fcac10641 100644 --- a/apps/user_ldap/lib/User/User.php +++ b/apps/user_ldap/lib/User/User.php @@ -33,6 +33,7 @@ use OCP\IAvatarManager; use OCP\IConfig; use OCP\Image; use OCP\IUserManager; +use OCP\Util; /** * User @@ -113,9 +114,11 @@ class User { LogWrapper $log, IAvatarManager $avatarManager, IUserManager $userManager) { if ($username === null) { - throw new \InvalidArgumentException("uid for '$dn' must not be null!"); + $log->log("uid for '$dn' must not be null!", Util::ERROR); + throw new \InvalidArgumentException('uid must not be null!'); } else if ($username === '') { - throw new \InvalidArgumentException("uid for '$dn' must not be an empty string!"); + $log->log("uid for '$dn' must not be an empty string", Util::ERROR); + throw new \InvalidArgumentException('uid must not be an empty string!'); } $this->access = $access; |