We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ca7f97e commit 0ddb7c2Copy full SHA for 0ddb7c2
src/helpers.php
@@ -110,8 +110,10 @@ function backpack_avatar_url($user)
110
{
111
switch (config('backpack.base.avatar_type')) {
112
case 'gravatar':
113
- if (backpack_users_have_email()) {
+ if (backpack_users_have_email() && !empty($user->email)) {
114
return Gravatar::fallback(config('backpack.base.gravatar_fallback'))->get($user->email);
115
+ } else {
116
+ return method_exists($user, 'placehold') ? $user->placehold() : $user->placehold;
117
}
118
break;
119
default:
0 commit comments