public function TfaCommands::sanitize in Two-factor Authentication (TFA) 8
File
- src/
Commands/ TfaCommands.php, line 18
Class
- TfaCommands
- A Drush command file.
Namespace
Drupal\tfa\CommandsCode
public function sanitize($result, CommandData $commandData) {
// DBTNG does not support expressions in delete queries.
$sql = "DELETE FROM users_data WHERE LEFT(name, 4) = 'tfa_'";
\Drupal::service('database')
->query($sql);
$this
->logger()
->success('Removed recovery codes and other user-specific TFA data.');
}