Skip to content

Commit

Permalink
User: Fix Resolution of Avatar
Browse files Browse the repository at this point in the history
  • Loading branch information
kergomard committed Nov 22, 2023
1 parent bf65020 commit 35345e9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Services/User/classes/Avatar/class.ilUserAvatarResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,12 @@ public function getAvatar(bool $name_as_set_as_text_closely = false): Avatar

public function getUserPictureForVCard(): array
{
if (!$this->hasProfilePicture()) {
if (!$this->hasProfilePicture()
|| $this->rid === '-') {
return [null, null];
}

if ($this->rid !== null
&& $this->rid !== '-'
&& ($identification = $this->irss->manage()->find($this->rid)) !== null) {
$flavour_streams = $this->irss->flavours()
->get($identification, $this->flavour_definition)
Expand Down Expand Up @@ -214,9 +214,8 @@ public function getUserPictureForVCard(): array
*/
public function getLegacyPictureURL(): string
{
if ($this->hasProfilePicture()) {
// IRSS
if ($this->rid !== null && $this->rid !== '-') {
if ($this->hasProfilePicture() && $this->rid !== '-') {
if ($this->rid !== null) {
return $this->resolveProfilePicturePath();
}

Expand Down

0 comments on commit 35345e9

Please sign in to comment.