You are here

public function CleantalkCheckUsersForm::cleantalk_remove_user in Anti Spam by CleanTalk 8.3

Same name and namespace in other branches
  1. 8.4 src/Form/CleantalkCheckUsersForm.php \Drupal\cleantalk\Form\CleantalkCheckUsersForm::cleantalk_remove_user()
  2. 9.1.x src/Form/CleantalkCheckUsersForm.php \Drupal\cleantalk\Form\CleantalkCheckUsersForm::cleantalk_remove_user()

File

src/Form/CleantalkCheckUsersForm.php, line 202

Class

CleantalkCheckUsersForm

Namespace

Drupal\cleantalk\Form

Code

public function cleantalk_remove_user(array $form, \Drupal\Core\Form\FormStateInterface $form_state) {
  $userid = $form_state
    ->getTriggeringElement()['#array_parents'][1];
  user_cancel(array(), $userid, 'user_cancel_delete');
}