-if ((isExtensionActive('user')) && (isReferralIdValid()) && (isValidUserId(determineReferralId()))) {
- // Update ref counter
- SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `ref_clicks`=`ref_clicks`+1 WHERE `userid`=%s LIMIT 1",
- array(makeZeroToNull(determineReferralId())), __FILE__, __LINE__);
+if ((isExtensionActive('user')) && (isReferralIdValid()) && (isValidId(determineReferralId()))) {
+ // Run filter chain for updating referral data
+ runFilterChain('update_referral_data');