From: Roland Häder Date: Fri, 7 Nov 2008 15:20:55 +0000 (+0000) Subject: Random mail counter now resets X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=commitdiff_plain;h=2fcca56060d097bb6b12437d224296386447d97b Random mail counter now resets --- diff --git a/inc/databases.php b/inc/databases.php index 8896da0f33..54370abbe6 100644 --- a/inc/databases.php +++ b/inc/databases.php @@ -114,7 +114,7 @@ define('USAGE_BASE', "usage"); define('SERVER_URL', "http://www.mxchange.org"); // This current patch level -define('CURR_SVN_REVISION', "525"); +define('CURR_SVN_REVISION', "526"); // Take a prime number which is long (if you know a longer one please try it out!) define('_PRIME', 591623); diff --git a/inc/libs/user_functions.php b/inc/libs/user_functions.php index 75cf35e997..faa279ca7d 100644 --- a/inc/libs/user_functions.php +++ b/inc/libs/user_functions.php @@ -251,6 +251,10 @@ function SELECT_RANDOM_REFID () { if (SQL_NUMROWS($result) == 1) { // Use that userid as new referal id list($refid) = SQL_FETCHROW($result); + + // Reset this user's counter + SQL_QUERY_ESC("UPDATE `"._MYSQL_PREFIX."_iser_data` SET `rand_confirmed`=0 WHERE userid=%s LIMIT 1", + array($refid), __FILE__, __LINE__); } // END - if // Free result