Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue #3346912 by zanvidmar: Profile pictures missing on landing page #3333

Merged
merged 2 commits into from
Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/social_features/social_profile/social_profile.module
Original file line number Diff line number Diff line change
Expand Up @@ -714,9 +714,9 @@ function social_profile_profile_view_alter(array &$build, EntityInterface $entit
/** @var \Drupal\Core\Session\AccountProxy $current_user */
$current_user = \Drupal::currentUser();

// If the current user is anonymous, it means it does not have access to the
// users profile.
if ($current_user->isAnonymous() &&
// If the current user has no access to viewing user profiles, it might not
// have access to the users profile.
if (!$current_user->hasPermission('view any profile profile') &&
isset($display->get('content')['field_profile_image'])
) {

Expand Down