You are here

function xmlsitemap_user_requirements in XML sitemap 6.2

Same name and namespace in other branches
  1. 5 xmlsitemap_user/xmlsitemap_user.install \xmlsitemap_user_requirements()
  2. 7.2 xmlsitemap_user/xmlsitemap_user.install \xmlsitemap_user_requirements()

Implements hook_requirements().

File

xmlsitemap_user/xmlsitemap_user.install, line 11
Install and uninstall schema and functions for the xmlsitemap_user module.

Code

function xmlsitemap_user_requirements($phase) {
  $requirements = array();
  $t = get_t();
  if ($phase == 'runtime') {
    if (!user_access('access user profiles', drupal_anonymous_user())) {
      $requirements['xmlsitemap_user_anonymous_permission'] = array(
        'title' => $t('XML sitemap user'),
        'value' => $t('Anonymous access to user profiles'),
        'description' => $t('In order to list user profile links in the sitemap, the anonymous user must have the <a href="@perm-link"><em>access user profiles</em> permission</a>.', array(
          '@perm-link' => url('admin/user/permissions', array(
            'fragment' => 'module-user',
          )),
        )),
        'severity' => REQUIREMENT_ERROR,
      );
    }
  }
  return $requirements;
}