Commit 3e81712f authored by elij's avatar elij Committed by Lukas Fleischer
Browse files

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: default avatarLukas Fleischer <>
parent 0898f144
......@@ -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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment