From: Roland Häder Date: Tue, 3 Nov 2009 15:52:44 +0000 (+0000) Subject: Nickname active, but id provided should result in valid refid X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=01894fd8602147cf872979a523d5da9b5b147a53;p=mailer.git Nickname active, but id provided should result in valid refid --- diff --git a/ref.php b/ref.php index 33b656e747..b308c84198 100644 --- a/ref.php +++ b/ref.php @@ -79,8 +79,18 @@ if (!empty($ref)) { // Load userid list($ref) = SQL_FETCHROW($result); } else { - // No entry found - $ref = 0; + // So do we have a userid? + $result2 = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `userid`='%s' LIMIT 1", + array($ref), __FILE__, __LINE__); + + // Do we have an entry? + if (SQL_NUMROWS($result2) == 0) { + // No entry, so no referal id + $ref = 0; + } // END - if + + // Free result + SQL_FREERESULT($result2); } // Free result