class TfaCommands in Two-factor Authentication (TFA) 8
A Drush command file.
Hierarchy
- class \Drupal\tfa\Commands\TfaCommands extends \Drush\Commands\DrushCommands implements \Drush\Drupal\Commands\sql\SanitizePluginInterface
Expanded class hierarchy of TfaCommands
1 string reference to 'TfaCommands'
1 service uses TfaCommands
File
- src/
Commands/ TfaCommands.php, line 13
Namespace
Drupal\tfa\CommandsView source
class TfaCommands extends DrushCommands implements SanitizePluginInterface {
/**
* {@inheritdoc}
*/
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.');
}
/**
* {@inheritdoc}
*/
public function messages(&$messages, InputInterface $input) {
return $messages[] = dt('Remove recovery codes and other user-specific TFA data.');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TfaCommands:: |
public | function | ||
TfaCommands:: |
public | function |