Skip to content

Commit

Permalink
Reverse the order for default gravatar
Browse files Browse the repository at this point in the history
Signed-off-by: snipe <[email protected]>
  • Loading branch information
snipe committed Jul 4, 2024
1 parent 1ca3dc2 commit 00f7cb9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/Presenters/UserPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,11 @@ public function gravatar()
return Storage::disk('public')->url('avatars/'.e($this->avatar));
}


// If there is a default avatar
if (Setting::getSettings()->default_avatar!= '') {
return Storage::disk('public')->url('avatars/'.e(Setting::getSettings()->default_avatar));
}

// Fall back to Gravatar if the settings allow loading remote scripts
if (Setting::getSettings()->load_remote == '1') {
if ($this->model->gravatar != '') {
Expand All @@ -460,10 +464,7 @@ public function gravatar()
}
}

// If there is a default avatar
if (Setting::getSettings()->default_avatar!= '') {
return Storage::disk('public')->url('avatars/'.e(Setting::getSettings()->default_avatar));
}


return false;
}
Expand Down

0 comments on commit 00f7cb9

Please sign in to comment.