You are here

user_form_test.module in Drupal 8

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

Namesort descending Description
user_form_test_form_user_cancel_form_alter Implements hook_form_FORM_ID_alter() for user_cancel_form().