diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2015-11-25 21:44:36 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2015-12-02 09:14:41 +0100 |
commit | dad6470baa817a796de7e1b6d27daf6d24519096 (patch) | |
tree | aeb21531d7465b8c2322076f5303744548778177 /lib/private/avatar.php | |
parent | c91192fb7324c246d3af95ae83ad9ac1ae0a8ec1 (diff) | |
download | nextcloud-server-dad6470baa817a796de7e1b6d27daf6d24519096.tar.gz nextcloud-server-dad6470baa817a796de7e1b6d27daf6d24519096.zip |
Add IUser::getAvatarImage() for easy access
Diffstat (limited to 'lib/private/avatar.php')
-rw-r--r-- | lib/private/avatar.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/private/avatar.php b/lib/private/avatar.php index 872da35f947..37a813f3ff8 100644 --- a/lib/private/avatar.php +++ b/lib/private/avatar.php @@ -79,7 +79,9 @@ class Avatar implements \OCP\IAvatar { /** @var File $node */ $node = $this->folder->get('avatar.' . $ext); $avatar->loadFromData($node->getContent()); - $avatar->resize($size); + if ($size > 0) { + $avatar->resize($size); + } $this->folder->newFile('avatar.' . $size . '.' . $ext)->putContent($avatar->data()); } return $avatar; |