Random mail counter now resets
authorRoland Häder <roland@mxchange.org>
Fri, 7 Nov 2008 15:20:55 +0000 (15:20 +0000)
committerRoland Häder <roland@mxchange.org>
Fri, 7 Nov 2008 15:20:55 +0000 (15:20 +0000)
inc/databases.php
inc/libs/user_functions.php

index 8896da0..54370ab 100644 (file)
@@ -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);
index 75cf35e..faa279c 100644 (file)
@@ -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