You are here

function xmlsitemap_user_user_presave in XML sitemap 7.2

Implements hook_user_presave().

File

xmlsitemap_user/xmlsitemap_user.module, line 52
Default file for XML sitemap user.

Code

function xmlsitemap_user_user_presave(&$edit, $account, $category) {
  if (!empty($account->uid)) {
    $link = xmlsitemap_user_create_link($account);
    if (isset($edit['xmlsitemap'])) {
      $link = $edit['xmlsitemap'] + $link;
      unset($edit['xmlsitemap']);
    }
    xmlsitemap_link_save($link, array(
      $link['type'] => $account,
    ));
  }
}