Esempio n. 1
0
        /*
         * If there's been an input error,
         * go back to the form.
         */
        $form_location->set_get_variable('error_message', $e->getMessage());
        $page_manager->set_return_to_url($form_location);
    }
    #exit;
}
/*
 * If the user wants to wipe the slate.
 */
if (isset($_GET['cancel'])) {
    /*
     * Delete any session variables that were set during
     * any attempts to fill in the form.
     */
    $exception_on_not_set = FALSE;
    $svm->delete('create-new-account: email', $exception_on_not_set);
    $svm->delete('create-new-account: confirm_email', $exception_on_not_set);
    /*
     * Set the return to location.
     */
    $return_to_url = new HTMLTags_URL();
    if (isset($_GET['cancel_page_location'])) {
        $return_to_url->set_url(urldecode($_GET['cancel_page_location']));
    } else {
        $return_to_url->set_file('/');
    }
    $page_manager->set_return_to_url($return_to_url);
}