Skip to content
Snippets Groups Projects
Commit f8e32aff authored by João Ventura's avatar João Ventura Committed by Joao Ventura
Browse files

Issue #3321639 by somersoft, NikLP, jcnventura: Respect DB prefix for running drush sql:sanitize

parent dad56a32
No related branches found
No related tags found
No related merge requests found
......@@ -39,9 +39,9 @@ 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_'";
$this->database->query($sql);
$this->database->delete('users_data')
->condition('name', 'tfa_%', 'LIKE')
->execute();
$this->logger()->success('Removed recovery codes and other user-specific TFA data.');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment