function user_edit_cancel_submit

Submit function for the 'Cancel account' button on the user edit form.

1 string reference to 'user_edit_cancel_submit'
user_profile_form in modules/user/user.pages.inc
Form builder; edit a user account or one of their profile categories.

File

modules/user/user.pages.inc, line 460

Code

function user_edit_cancel_submit($form, &$form_state) {
    $destination = array();
    if (isset($_GET['destination'])) {
        $destination = drupal_get_destination();
        unset($_GET['destination']);
    }
    // Note: We redirect from user/uid/edit to user/uid/cancel to make the tabs disappear.
    $form_state['redirect'] = array(
        "user/" . $form['#user']->uid . "/cancel",
        array(
            'query' => $destination,
        ),
    );
}

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