Referrals 0.7.0: Module card limits and a correct unique users count
Referrals 0.7.0 shows the module’s two limits on its card on the admin Modules page and fixes a usage figure that counted uses instead of people.
Limits on the Modules page
The Referrals card on Admin → Modules now shows Max per user and Max uses, the two site-wide limits from the referral settings. Core draws the card with its general module card, which reads these figures from the module, instead of its own built-in referral codes card.
Unique users
The usage statistics for a code (get_usage_stats/1) reported unique_users equal to the total number of uses, so one person using a code three times counted as three people. It now counts distinct users. The admin pages do not show this figure; it matters to code that reads the statistics.
Upgrading
No migration: update the dependency. The package was built and tested against PhoenixKit 2.64.1 and its set of dependencies, including mint 1.10.0, which fixes EEF-CVE-2026-82728 and EEF-CVE-2026-82729. Your app’s own lock file decides which mint it runs.
Full release notes: Referrals 0.7.0
0.7.0 · 24 October 2026
Added
module_stats/0— the “Max per user” and “Max uses” figures for this module’s card on the admin Modules page. Core renders the card through its generic external-module card, which readsmodule_stats/0when present, instead of its own hardcoded Referral Codes card.
Fixed
unique_usersinget_usage_stats/1counted usage rows, not people.distinct: truewas passed as aRepo.aggregate/4option, which Ecto accepts and ignores, sounique_usersalways equalledtotal_uses: one person redeeming a code three times showed as three unique users. The count is nowcount(used_by_uuid, :distinct)in the query itself.
Changed
- Dependency refresh:
phoenix_kit2.64.1 and its transitive set (includingmint1.10.0, which fixes EEF-CVE-2026-82728 and EEF-CVE-2026-82729).
Referrals 0.7.0. Install or update: {:phoenix_kit_referrals, "~> 0.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.