mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
0898f1447a
commit
3e81712fd6
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue