summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2015-07-08 02:17:44 +0200
committerArthur Schiwon <blizzz@owncloud.com>2015-07-27 17:27:00 +0200
commitb37d62d9d32ed44b8086fd75f6dcb9a66fb0955d (patch)
treeb585a957163728c3f1c6b474f8930cc66024a7e4 /apps/user_ldap
parent85b7bde7d443e473d6980c9b86ab75017a469c44 (diff)
downloadnextcloud-server-b37d62d9d32ed44b8086fd75f6dcb9a66fb0955d.tar.gz
nextcloud-server-b37d62d9d32ed44b8086fd75f6dcb9a66fb0955d.zip
fix uncaught exception on not permitted file types when setting avatar, fixes #17232
Diffstat (limited to 'apps/user_ldap')
-rw-r--r--apps/user_ldap/lib/user/user.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/user_ldap/lib/user/user.php b/apps/user_ldap/lib/user/user.php
index 54ee7a9b543..ac5d8f5a374 100644
--- a/apps/user_ldap/lib/user/user.php
+++ b/apps/user_ldap/lib/user/user.php
@@ -342,7 +342,13 @@ class User {
}
$avatar = $this->avatarManager->getAvatar($this->uid);
- $avatar->set($this->image);
+ try {
+ $avatar->set($this->image);
+ } catch (\Exception $e) {
+ \OC::$server->getLogger()->notice(
+ 'Could not set avatar for ' . $this->dn . ', because: ' . $e->getMessage(),
+ ['app' => 'user_ldap']);
+ }
}
}