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