function user_cancel_methods
Same name and namespace in other branches
- 11.x core/modules/user/user.module \user_cancel_methods()
- 10 core/modules/user/user.module \user_cancel_methods()
- 9 core/modules/user/user.module \user_cancel_methods()
- 8.9.x core/modules/user/user.module \user_cancel_methods()
- 7.x modules/user/user.pages.inc \user_cancel_methods()
Helper function to return available account cancellation methods.
See documentation of hook_user_cancel_methods_alter().
Return value
array An array containing all account cancellation methods as form elements.
Deprecated
in drupal:11.5.0 and is removed from drupal:13.0.0. Use \Drupal\user\AccountCancellation::cancelMethods() instead.
See also
https://www.drupal.org/node/3620934
hook_user_cancel_methods_alter()
user_admin_settings()
File
-
core/
modules/ user/ user.module, line 266
Code
function user_cancel_methods() : array {
@trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. Use \\Drupal\\user\\AccountCancellation::cancelMethods() instead. See https://www.drupal.org/node/3620934', E_USER_DEPRECATED);
return \Drupal::service(AccountCancellation::class)->cancelMethods();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.