From 36ae16262662821eaedf8bd28cab904fbb290eec Mon Sep 17 00:00:00 2001 From: snipe Date: Thu, 4 Jul 2024 16:48:05 +0100 Subject: [PATCH] Changed my mind :) Signed-off-by: snipe --- app/Presenters/UserPresenter.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/app/Presenters/UserPresenter.php b/app/Presenters/UserPresenter.php index ddd72ea2c8..f60db150a1 100644 --- a/app/Presenters/UserPresenter.php +++ b/app/Presenters/UserPresenter.php @@ -445,11 +445,7 @@ class UserPresenter extends Presenter 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 != '') { @@ -464,7 +460,10 @@ class UserPresenter extends Presenter } } - + // If there is a default avatar + if (Setting::getSettings()->default_avatar!= '') { + return Storage::disk('public')->url('avatars/'.e(Setting::getSettings()->default_avatar)); + } return false; }