]> jfr.im git - irc/unrealircd/unrealircd-webpanel.git/commitdiff
Ban user with ID and not entire object
authorValerie Pond <redacted>
Mon, 9 Jan 2023 17:50:52 +0000 (17:50 +0000)
committerValerie Pond <redacted>
Mon, 9 Jan 2023 17:50:52 +0000 (17:50 +0000)
users.php

index 506687e18e152d9a5bd94e677ff37ecd84322299..1ce5e33ed34b8398612df16c38388036a0b620f1 100644 (file)
--- a/users.php
+++ b/users.php
@@ -45,7 +45,7 @@ if (!empty($_POST))
 
                        $msg_msg = ($duration == "0" || $duration == "0w0d0h") ? "permanently" : "for ".rpc_convert_duration_string($duration);
                        $reason = (isset($_POST['ban_reason'])) ? $_POST['ban_reason'] : "No reason";
-                       if ($rpc->serverban()->add($user, $bantype, $duration, $reason))
+                       if ($rpc->serverban()->add($user->id, $bantype, $duration, $reason))
                                Message::Success($user->name . " (*@".$user->hostname.") has been $bantype" . "d $msg_msg: $reason");
                }
        }