function system_update_7015

Change the user logout path.

Related topics

File

modules/system/system.install, line 2152

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.