diff options
Diffstat (limited to 'lib/private/avatar.php')
-rw-r--r-- | lib/private/avatar.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/private/avatar.php b/lib/private/avatar.php index a9d9346d50a..5e234d77bb2 100644 --- a/lib/private/avatar.php +++ b/lib/private/avatar.php @@ -43,6 +43,15 @@ class OC_Avatar implements \OCP\IAvatar { } /** + * Check if an avatar exists for the user + * + * @return bool + */ + public function exists() { + return $this->view->file_exists('avatar.jpg') || $this->view->file_exists('avatar.png'); + } + + /** * sets the users avatar * @param \OC_Image|resource|string $data OC_Image, imagedata or path to set a new avatar * @throws Exception if the provided file is not a jpg or png image |