public function CleantalkCheckUsersForm::cleantalk_delete_all_spammers_users in Anti Spam by CleanTalk 8.3
Same name and namespace in other branches
- 8.4 src/Form/CleantalkCheckUsersForm.php \Drupal\cleantalk\Form\CleantalkCheckUsersForm::cleantalk_delete_all_spammers_users()
- 9.1.x src/Form/CleantalkCheckUsersForm.php \Drupal\cleantalk\Form\CleantalkCheckUsersForm::cleantalk_delete_all_spammers_users()
File
- src/
Form/ CleantalkCheckUsersForm.php, line 209
Class
Namespace
Drupal\cleantalk\FormCode
public function cleantalk_delete_all_spammers_users(array $form, \Drupal\Core\Form\FormStateInterface $form_state) {
$post_array = str_replace('delete_all_', '', $form_state
->getTriggeringElement()['#name']);
$ids = explode('_', $post_array);
foreach ($ids as $id) {
user_cancel(array(), $id, 'user_cancel_delete');
}
}