function CancelUser::access

Same name in other branches
  1. 9 core/modules/user/src/Plugin/Action/CancelUser.php \Drupal\user\Plugin\Action\CancelUser::access()
  2. 8.9.x core/modules/user/src/Plugin/Action/CancelUser.php \Drupal\user\Plugin\Action\CancelUser::access()
  3. 11.x core/modules/user/src/Plugin/Action/CancelUser.php \Drupal\user\Plugin\Action\CancelUser::access()

Overrides ActionInterface::access

File

core/modules/user/src/Plugin/Action/CancelUser.php, line 89

Class

CancelUser
Cancels a user account.

Namespace

Drupal\user\Plugin\Action

Code

public function access($object, ?AccountInterface $account = NULL, $return_as_object = FALSE) {
    
    /** @var \Drupal\user\UserInterface $object */
    return $object->access('delete', $account, $return_as_object);
}

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