user_form_test.module

Same filename and directory in other branches
  1. 7.x modules/user/tests/user_form_test.module
  2. 9 core/modules/user/tests/modules/user_form_test/user_form_test.module
  3. 8.9.x core/modules/user/tests/modules/user_form_test/user_form_test.module
  4. 10 core/modules/user/tests/modules/user_form_test/user_form_test.module

Support module for user form testing.

File

core/modules/user/tests/modules/user_form_test/user_form_test.module

View source
<?php


/**
 * @file
 * Support module for user form testing.
 */

/**
 * Implements hook_form_FORM_ID_alter() for user_cancel_form().
 */
function user_form_test_form_user_cancel_form_alter(&$form, &$form_state) {
    $form['user_cancel_confirm']['#default_value'] = FALSE;
    $form['access']['#value'] = \Drupal::currentUser()->hasPermission('cancel other accounts');
}

Functions

Title Deprecated Summary
user_form_test_form_user_cancel_form_alter Implements hook_form_FORM_ID_alter() for user_cancel_form().

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