summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorelij <elij.mx@gmail.com>2011-05-11 06:01:29 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2011-05-17 10:43:46 +0200
commit3e81712fd6891516b24e216992edcb15c6a6113f (patch)
tree856e30a1912a4c59f618d911f61c64c7c78a9a8f
parent0898f1447a2d6bdc893f55f4718f867734841361 (diff)
downloadaur-3e81712fd6891516b24e216992edcb15c6a6113f.tar.gz
aur-3e81712fd6891516b24e216992edcb15c6a6113f.tar.xz
fix case where user does not exist
the query was being performed when $id was not set, resulting in an invalid sql query being performed. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
-rw-r--r--web/lib/acctfuncs.inc3
1 files changed, 3 insertions, 0 deletions
diff --git a/web/lib/acctfuncs.inc b/web/lib/acctfuncs.inc
index 5bcff8b5..b2f0548e 100644
--- a/web/lib/acctfuncs.inc
+++ b/web/lib/acctfuncs.inc
@@ -786,6 +786,9 @@ function valid_passwd( $userID, $passwd )
*/
function user_suspended( $id )
{
+ if (!$id) {
+ return false;
+ }
$dbh = db_connect();
$q = "SELECT Suspended FROM Users WHERE ID = " . $id;
$result = db_query($q, $dbh);