Browse Source

fix: Fix avatar images

Signed-off-by: Christopher Ng <chrng8@gmail.com>
tags/v27.1.9rc1
Christopher Ng 1 month ago
parent
commit
0a873c068d
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      lib/private/Avatar/AvatarManager.php

+ 7
- 0
lib/private/Avatar/AvatarManager.php View File

@@ -101,6 +101,9 @@ class AvatarManager implements IAvatarManager {

/**
* return a user specific instance of \OCP\IAvatar
*
* If the user is disabled a guest avatar will be returned
*
* @see \OCP\IAvatar
* @param string $userId the ownCloud user id
* @return \OCP\IAvatar
@@ -113,6 +116,10 @@ class AvatarManager implements IAvatarManager {
throw new \Exception('user does not exist');
}

if (!$user->isEnabled()) {
return $this->getGuestAvatar($userId);
}

// sanitize userID - fixes casing issue (needed for the filesystem stuff that is done below)
$userId = $user->getUID();


Loading…
Cancel
Save