Fix user existence checks; whacks bug#2585

This commit is contained in:
simo 2005-04-23 16:48:37 +00:00
parent 07249c0fd9
commit f6ea024640

View file

@ -40,7 +40,7 @@ if (isset($_COOKIE["AURSID"])) {
$q.= "WHERE AccountTypes.ID = Users.AccountTypeID "; $q.= "WHERE AccountTypes.ID = Users.AccountTypeID ";
$q.= "AND Users.ID = ".intval($_REQUEST["ID"]); $q.= "AND Users.ID = ".intval($_REQUEST["ID"]);
$result = db_query($q, $dbh); $result = db_query($q, $dbh);
if (!$result) { if (!mysql_num_rows($result)) {
print __("Could not retrieve information for the specified user."); print __("Could not retrieve information for the specified user.");
} else { } else {
@ -87,7 +87,7 @@ if (isset($_COOKIE["AURSID"])) {
$q.= "AND Sessions.SessionID = '"; $q.= "AND Sessions.SessionID = '";
$q.= mysql_escape_string($_COOKIE["AURSID"])."'"; $q.= mysql_escape_string($_COOKIE["AURSID"])."'";
$result = db_query($q, $dbh); $result = db_query($q, $dbh);
if (!$result) { if (!mysql_num_rows($result)) {
print __("Could not retrieve information for the specified user."); print __("Could not retrieve information for the specified user.");
} else { } else {