You are here

function system_update_7015 in Drupal 7

Change the user logout path.

Related topics

File

modules/system/system.install, line 2133
Install, update and uninstall functions for the system module.

Code

function system_update_7015() {
  db_update('menu_links')
    ->fields(array(
    'link_path' => 'user/logout',
  ))
    ->condition('link_path', 'logout')
    ->execute();
  db_update('menu_links')
    ->fields(array(
    'router_path' => 'user/logout',
  ))
    ->condition('router_path', 'logout')
    ->execute();
  db_update('menu_links')
    ->fields(array(
    'menu_name' => 'user-menu',
    'plid' => 0,
  ))
    ->condition(db_or()
    ->condition('link_path', 'user/logout')
    ->condition('router_path', 'user/logout'))
    ->condition('module', 'system')
    ->condition('customized', 0)
    ->execute();
}