1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

[ticket/9687] Add separate column for user_id

PHPBB3-9687
This commit is contained in:
Marc Alexander
2023-07-31 11:53:33 +02:00
parent f9a0e4d606
commit 0414536727
6 changed files with 34 additions and 29 deletions

View File

@@ -307,9 +307,12 @@ class manager
$manual_modes[] = $ban_mode;
continue;
}
$where_column = $user_column == 'user_id' ? 'b.ban_userid' : 'b.ban_item';
$where_array[] = ['AND',
[
['b.ban_item', '=', 'u.' . $user_column],
[$where_column, '=', 'u.' . $user_column],
['b.ban_mode', '=', "'{$ban_mode->get_type()}'"],
],
];