Project

General

Profile

Revision b0dc3a2e

Added by Julien Enselme over 7 years ago

Update to Drupal 7.52

View differences:

drupal7/modules/user/tests/user_form_test.module
62 62
function user_form_test_current_password_submit($form, &$form_state) {
63 63
  drupal_set_message(t('The password has been validated and the form submitted successfully.'));
64 64
}
65

  
66
/**
67
 * Implements hook_form_FORM_ID_alter().
68
 */
69
function user_form_test_form_user_profile_form_alter(&$form, &$form_state) {
70
  if (variable_get('user_form_test_user_profile_form_rebuild', FALSE)) {
71
    $form['#submit'][] = 'user_form_test_user_account_submit';
72
  }
73
}
74

  
75
/**
76
 * Submit function for user_profile_form().
77
 */
78
function user_form_test_user_account_submit($form, &$form_state) {
79
  // Rebuild the form instead of letting the process end. This allows us to
80
  // test for bugs that can be triggered in contributed modules.
81
  $form_state['rebuild'] = TRUE;
82
}

Also available in: Unified diff