Commit 66c5df53 authored by andrei.dincu's avatar andrei.dincu
Browse files

Issue #2249723 by andrei.dincu: Check if anonymous user can access user...

Issue #2249723 by andrei.dincu: Check if anonymous user can access user profiles only if xmlsitemap_entity_user variable is set
parent cff36515
...@@ -144,7 +144,7 @@ function xmlsitemap_requirements($phase) { ...@@ -144,7 +144,7 @@ function xmlsitemap_requirements($phase) {
} }
$anonymous_accout = new AnonymousUserSession(); $anonymous_accout = new AnonymousUserSession();
if (!$anonymous_accout->hasPermission('access user profiles')) { if (!$anonymous_accout->hasPermission('access user profiles') && \Drupal::config('xmlsitemap.settings')->get('xmlsitemap_entity_user')) {
$requirements['xmlsitemap_user_anonymous_permission'] = array( $requirements['xmlsitemap_user_anonymous_permission'] = array(
'title' => $t('XML sitemap user'), 'title' => $t('XML sitemap user'),
'value' => $t('Anonymous access to user profiles'), 'value' => $t('Anonymous access to user profiles'),
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment