You are here

function _xmlsitemap_user_frontpage in XML sitemap 5

Get the uid of the front page profile.

Related topics

2 calls to _xmlsitemap_user_frontpage()
hook_xmlsitemap_links in docs/xmlsitemap.php
Define additional links to add to the site map.
_xmlsitemap_user_links in xmlsitemap_user/xmlsitemap_user.module
Get user profile links.

File

xmlsitemap_user/xmlsitemap_user.module, line 67
Adds user profiles to the site map.

Code

function _xmlsitemap_user_frontpage() {
  static $uid;
  if (!isset($uid)) {
    $uid = 0;
    $frontpage = explode('/', drupal_get_normal_path(variable_get('site_frontpage', 'node')));
    if (count($frontpage == 2) && $frontpage[0] == 'user' && is_numeric($frontpage[1])) {
      $uid = $frontpage[1];
    }
  }
  return $uid;
}