- $result = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET mails_confirmed=mails_confirmed+1 WHERE userid=%s LIMIT 1",
- array($url_uid), __FILE__, __LINE__);
- }
+ SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET mails_confirmed=mails_confirmed + 1 WHERE userid=%s LIMIT 1",
+ array($url_uid), __FILE__, __LINE__);
+
+ // Update random confirmed as well?
+ if (GET_EXT_VERSION("user") >= "0.3.4") {
+ // Update second counter
+ SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_user_data SET rand_confirmed=rand_confirmed + 1 WHERE userid=%s LIMIT 1",
+ array($url_uid), __FILE__, __LINE__);
+ } // END - if
+ } // END - if
+
+ // Insert stats record
+ USER_STATS_INSERT_RECORD($url_uid, $type, $stats_data);