]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/user_functions.php
Random mail counter now resets
[mailer.git] / inc / libs / user_functions.php
index 75cf35e9972a3bfa42064ed2895e5c0b9b651523..faa279ca7d988c97fbbe148e18c1e22d655f6872 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