mirror of
https://github.com/nextcloud/server.git
synced 2026-06-07 15:53:04 -04:00
fix: Fix avatar images
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
261764568d
commit
35ce939332
1 changed files with 7 additions and 0 deletions
|
|
@ -69,6 +69,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
|
||||
* @throws \Exception In case the username is potentially dangerous
|
||||
|
|
@ -80,6 +83,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…
Reference in a new issue