function system_update_7015

Change the user logout path.

Related topics

Archivo

drupal-7.x/modules/system/system.install, line 2022
Install, update and uninstall functions for the system module.

Código

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();
}