summaryrefslogtreecommitdiffstats
path: root/lib/private/Avatar/UserAvatar.php
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2021-03-25 12:21:03 +0100
committerVincent Petry <vincent@nextcloud.com>2021-03-26 13:07:09 +0100
commitbb008be28af2e7379883543d73c18f63680915a6 (patch)
tree86989d073d8eacc681d000cebc39ae968cc43586 /lib/private/Avatar/UserAvatar.php
parentb66af8a4329852ee599438c5be74e9246b4e0a68 (diff)
downloadnextcloud-server-bb008be28af2e7379883543d73c18f63680915a6.tar.gz
nextcloud-server-bb008be28af2e7379883543d73c18f63680915a6.zip
Added PlaceholderAvatar with own cached images
When avatar scope is private, the PlaceholderAvatar is used to deliver a placeholder avatar based on the user's initials. This was implemented as a separate class for now to avoid messing with the existing UserAvatar implementation and its generated vs non-generated logic. Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'lib/private/Avatar/UserAvatar.php')
-rw-r--r--lib/private/Avatar/UserAvatar.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/private/Avatar/UserAvatar.php b/lib/private/Avatar/UserAvatar.php
index f7ace429f7d..f47809425ed 100644
--- a/lib/private/Avatar/UserAvatar.php
+++ b/lib/private/Avatar/UserAvatar.php
@@ -270,6 +270,7 @@ class UserAvatar extends Avatar {
throw new NotFoundException;
}
+ // TODO: rework to integrate with the PlaceholderAvatar in a compatible way
if ($this->folder->fileExists('generated')) {
if (!$data = $this->generateAvatarFromSvg($size)) {
$data = $this->generateAvatar($this->getDisplayName(), $size);