diff --git a/contrib/ipban/main.php b/contrib/ipban/main.php index c74ed3d5..9d2ae0a9 100644 --- a/contrib/ipban/main.php +++ b/contrib/ipban/main.php @@ -176,7 +176,11 @@ class IPBan extends Extension { // database {{{ private function get_bans() { global $database; - $bans = $database->get_all("SELECT * FROM bans ORDER BY end, id"); + $bans = $database->get_all(" + SELECT bans.*, users.name as banner_name + FROM bans + JOIN users ON banner_id = users.id + ORDER BY end, id"); if($bans) {return $bans;} else {return array();} } diff --git a/contrib/ipban/theme.php b/contrib/ipban/theme.php index 473754bf..6f8fce0c 100644 --- a/contrib/ipban/theme.php +++ b/contrib/ipban/theme.php @@ -12,6 +12,7 @@ class IPBanTheme extends Themelet { * ) */ public function display_bans($page, $bans) { + global $user; $h_bans = ""; foreach($bans as $ban) { $end_human = date('Y-m-d', $ban['end']); @@ -19,6 +20,7 @@ class IPBanTheme extends Themelet {