Mitch Referrals v1.4.3 – Feature Update & Stability Release
This release finalizes the referral → credit flow, removes all DBTech bridge dependency for payouts, and adds long-requested visibility and registration improvements.

Referral Attribution (Stable & Final)
Referrals are now attributed at registration time as the single source of truth.
Attribution works via:
Referral cookie OR
Username entered on the registration form
Each user can only ever be attributed once.
Self-referrals are blocked.
Attribution never breaks registration if something fails.

DBTech Credits – Direct PHP Payouts (No Bridge)
Credits are now awarded directly via PHP.
DBTech “Event” logic is no longer used to determine amounts.
No reliance on:
Content type filters
Event caps
Daily limits
Apply-max rules
Credits are always awarded exactly once per valid referral.

Referral Payout Rules (Single-Line Option)
Referral payouts are now controlled by a single option string.
Format (single line only):
*=1000|Registered=250|Moderator=500|Administrative=0
How it works:
*= is the fallback payout
Matches are done by user group title
If a user belongs to multiple groups, the highest payout wins
Group titles make this portable across installs

Affiliate Referrals Page (Member-Facing)
New public page showing:
Who referred whom
Referral dates
Accessible to logged-in members
Clean, paginated layout
Linked from the Members menu

Referral Widget Improvements
Referral link is displayed in a read-only field
Copy button now uses XenForo’s clipboard handler correctly
Users can copy their referral link with one click

Registration Page Enhancement
Optional “Referred by (username)” field added to registration
Username is validated and resolved at registration
Triggers the same referral logic as cookie-based referrals
🛠 Technical / Internal
Referral attribution handled in XF\Entity\User::_postSave
Referral repository is the single source of truth
Safer IP logging
No _output files edited directly
Fully XenForo 2.3.7 compliant

Result
- Credits award reliably
- Stats remain accurate
- Admin control is simple
- Users can clearly see referral relationships
- No fragile event configuration required