aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-08-07 14:55:33 +0200
committerRobin Appelman <robin@icewind.nl>2018-08-07 14:55:33 +0200
commitec8ab83ea57f0a493035260d2775fc535babea4f (patch)
tree7032a13f9d144de614e9701a9bba79b5e67afd35
parentf8de12c0147d7982ce6ff0a4ec67bbb9c546a2aa (diff)
downloadnextcloud-server-ec8ab83ea57f0a493035260d2775fc535babea4f.tar.gz
nextcloud-server-ec8ab83ea57f0a493035260d2775fc535babea4f.zip
get avatar custom status from user config
this saves a cache operation because the user config is already cached Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r--lib/private/Avatar.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Avatar.php b/lib/private/Avatar.php
index 116f8368e71..d107bb47c52 100644
--- a/lib/private/Avatar.php
+++ b/lib/private/Avatar.php
@@ -125,7 +125,7 @@ class Avatar implements IAvatar {
* @return bool
*/
public function isCustomAvatar(): bool {
- return !$this->folder->fileExists('generated');
+ return $this->config->getUserValue($this->user->getUID(), 'avatar', 'generated', 'false') !== 'true';
}
/**