Update BanList\GetList

Change the name of the creator of the ban and its id if this user is deleted.
This commit is contained in:
Visman 2020-11-27 15:08:00 +07:00
parent d5836d258c
commit c053b72c9c
2 changed files with 6 additions and 1 deletions

View file

@ -25,6 +25,11 @@ class GetList extends Method
$list = \array_fill_keys($ids, false);
while ($row = $stmt->fetch()) {
if (null === $row['name_creator']) {
$row['name_creator'] = 'User #' . $row['id_creator'];
$row['id_creator'] = 1;
}
$list[$row['id']] = $row;
}

View file

@ -474,7 +474,7 @@ class Bans extends Admin
'id' => $ban['id_creator'],
'name' => $ban['name_creator'],
]
), // ????
),
];
$fields[] = [
'type' => 'endwrap',