From 603bca7b0b6492af05b88bd10f45152656aaa9e8 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 21 Feb 2014 12:05:39 -0800 Subject: [PATCH] admin web: fix small bugs in manage_user.php --- html/ops/manage_user.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/html/ops/manage_user.php b/html/ops/manage_user.php index a5f0e0729d..3fd90c6a29 100644 --- a/html/ops/manage_user.php +++ b/html/ops/manage_user.php @@ -33,6 +33,7 @@ require_once("../inc/util_ops.inc"); require_once("../inc/profile.inc"); require_once("../project/project.inc"); +get_logged_in_user(); db_init(); $is_admin = true; @@ -173,7 +174,7 @@ if (isset($_POST['suspend_submit']) && !empty($user) && $is_admin) { ); } else { if (is_numeric($dt)) { - $t = time()+$dt; + $t = $dt>0 ? time()+$dt : 0; $q = "UPDATE forum_preferences SET banished_until=$t WHERE userid=$id"; mysql_query($q);