[ticket/17347] Get rid of not needed code duplication

PHPBB-17347
This commit is contained in:
Marc Alexander 2024-06-22 07:33:06 +02:00
parent 7f9bcc2743
commit fa893f092b
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -216,11 +216,7 @@ class delete_id extends command
*/
protected function delete_bot_user(array $user_row): void
{
$sql = 'DELETE FROM ' . $this->bots_table . '
WHERE user_id = ' . (int) $user_row['user_id'];
$this->db->sql_query($sql);
$delete_tables = [$this->user_group_table, $this->users_table];
$delete_tables = [$this->bots_table, $this->user_group_table, $this->users_table];
foreach ($delete_tables as $table)
{
$sql = "DELETE FROM $table