user_form_test.module
Same filename in other branches
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.