PHPackages                             linkrobins/referral - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. linkrobins/referral

ActiveFlarum-extension[Utility &amp; Helpers](/categories/utility)

linkrobins/referral
===================

Invite code referral system for Flarum 2.0.

v1.2.1(1mo ago)1159↓37.5%MITPHP ^8.3

Since May 4Compare

[ Source](https://github.com/linkrobins/referral)[ Packagist](https://packagist.org/packages/linkrobins/referral)[ RSS](/packages/linkrobins-referral/feed)WikiDiscussions Synced 3w ago

READMEChangelog (9)Dependencies (1)Versions (12)Used By (0)

Link Robins Referral
====================

[](#link-robins-referral)

An invite code referral system for [Flarum](https://flarum.org/) 2.0. Each member gets a unique personal invite code they can share with others. New users enter the code during registration to be credited to the referrer. Admins can optionally require a code to register at all.

---

Features
--------

[](#features)

- Every member automatically gets a unique 8-character invite code
- Members share their code with anyone they want to invite
- New users enter the code during sign-up — no URL tricks, no extra steps
- Referral count badge appears on the member's profile nav tab and profile card
- Referrer receives a notification when someone registers with their code
- Admin setting to require an invite code for all new registrations
- Fully translatable via locale files

Screenshots
-----------

[](#screenshots)

**Referrals profile tab** — shows the member's invite code and total referral count. [![image](https://private-user-images.githubusercontent.com/213107296/587394863-4890871b-a5be-4208-adc2-602f5611e8ad.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5OTAxOTEsIm5iZiI6MTc4Mjk4OTg5MSwicGF0aCI6Ii8yMTMxMDcyOTYvNTg3Mzk0ODYzLTQ4OTA4NzFiLWE1YmUtNDIwOC1hZGMyLTYwMmY1NjExZThhZC5w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U2NjVmODAyY2EyMWM3Yzc4MzcxNzNhNTU2ZDViODdmNzk3JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.T4nNUFORkb3VXR_3qibVQoqKn3-0B7jcKPT7xmf4YqU)

**Sign-up modal** — includes an optional (or required) Invite Code field. [![image](https://private-user-images.githubusercontent.com/213107296/587394930-d9fb52c6-6ffd-4163-8c1a-82dbd8962de5.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5OTAxOTEsIm5iZiI6MTc4Mjk4OTg5MSwicGF0aCI6Ii8yMTMxMDcyOTYvNTg3Mzk0OTMwLWQ5ZmI1MmM2LTZmZmQtNDE2My04YzFhLTgyZGJkODk2MmRlNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcwMlQxMDU4MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wZTQwZWI0NTE3YzUwZDY1ODQ1M2NkYzRmNGQ4ZDg0Y2QyOWYzYTQxZjIwMDFmYmFlMzk2MTRmMzkxY2RmNjlkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.ESXi9L83U6jaZ3blrXPGtxdPOuyw-45eluVbuGuQwZ8)](https://private-user-images.githubusercontent.com/213107296/587394930-d9fb52c6-6ffd-4163-8c1a-82dbd8962de5.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5OTAxOTEsIm5iZiI6MTc4Mjk4OTg5MSwicGF0aCI6Ii8yMTMxMDcyOTYvNTg3Mzk0OTMwLWQ5ZmI1MmM2LTZmZmQtNDE2My04YzFhLTgyZGJkODk2MmRlNS5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjYwNzAyJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI2MDcwMlQxMDU4MTFaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wZTQwZWI0NTE3YzUwZDY1ODQ1M2NkYzRmNGQ4ZDg0Y2QyOWYzYTQxZjIwMDFmYmFlMzk2MTRmMzkxY2RmNjlkJlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.ESXi9L83U6jaZ3blrXPGtxdPOuyw-45eluVbuGuQwZ8)

**Admin settings** — toggle to require an invite code to register. [![image](https://private-user-images.githubusercontent.com/213107296/587394969-47d6cc2c-f816-42b6-8b09-81e64db2bf64.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODI5OTAxOTEsIm5iZiI6MTc4Mjk4OTg5MSwicGF0aCI6Ii8yMTMxMDcyOTYvNTg3Mzk0OTY5LTQ3ZDZjYzJjLWY4MTYtNDJiNi04YjA5LTgxZTY0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E5OTVmMmVlZDZlZmNjZmE0MjZiZDMzMmJlYTg2MzQ1ODRhOTg3MjFiNjQwZmE5Yzg2ZDU2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZyZXNwb25zZS1jb250ZW50LXR5cGU9aW1hZ2UlMkZwbmcifQ.sAB9CTw1p7eOBkG8tYZ-lHzr4h-sa5XBo70NwBkwtRI)

---

Requirements
------------

[](#requirements)

- Flarum 2.0 or later
- PHP 8.1 or later

---

Installation
------------

[](#installation)

Install via Composer:

```
composer require linkrobins/referral

```

Then run migrations and clear the cache:

```
php flarum migrate
php flarum cache:clear

```

Enable the extension in the Flarum admin panel under **Extensions**.

---

Usage
-----

[](#usage)

### For Members

[](#for-members)

1. Go to your profile and click the **Referrals** tab
2. Your personal invite code is displayed — share it with anyone you want to invite
3. When someone registers using your code, you receive a notification and your referral count increases

### For New Users

[](#for-new-users)

1. Click **Sign Up**
2. Fill in your username, email, and password as normal
3. Enter the invite code you received in the **Invite Code** field
4. Complete registration

### For Admins

[](#for-admins)

1. Go to **Admin → Extensions → Link Robins Referral**
2. Toggle **Require invite code to register** to enforce invite-only registration
3. When enabled, no one can register without a valid invite code

---

Translations
------------

[](#translations)

The extension ships with English (`locale/en.yml`). To add a translation:

1. Create a new file in the `locale/` directory named after the [ISO 639-1 language code](https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes), e.g.:

    - `ko.yml` — Korean
    - `zh.yml` — Simplified Chinese
    - `es.yml` — Spanish
2. Copy the contents of `en.yml` and translate the values
3. No code changes needed — Flarum picks up locale files automatically

### Example (`es.yml`)

[](#example-esyml)

```
linkrobins-referral:
  forum:
    profile:
      tab: Referencias
      invite_code_title: Tu Código de Invitación
      invite_code_help: Comparte este código con quien quieras invitar.
      copy: Copiar
      total_referrals: Total de Referencias
      no_referrals: "¡Aún no hay referencias. Comparte tu código para empezar!"
    sign_up:
      invite_code_label: Código de invitación
      invite_code_label_required: "Código de invitación *"
      invite_code_placeholder: ej. K7XM2QNP
    notification:
      user_referred: "{displayName} se registró usando tu código de invitación."
  admin:
    settings:
      require_label: Requerir código de invitación para registrarse
      require_help: Cuando está activado, los usuarios deben ingresar un código válido.
      enabled: Activado
      disabled: Desactivado
  validation:
    required: Se requiere un código de invitación para registrarse.
    invalid: Código de invitación inválido.
```

---

Database
--------

[](#database)

The extension creates two tables:

- `referral_invite_codes` — stores each member's unique invite code and use count
- `referral_invited_user` — records which user referred which

These are created automatically when the extension is enabled. They are safely removed when the extension is uninstalled.

---

Links
-----

[](#links)

- [Packagist](https://packagist.org/packages/linkrobins/referral)
- [GitHub](https://github.com/linkrobins/referral)
- [Link Robins](https://linkrobins.com)

---

License
-------

[](#license)

MIT License. See [LICENSE](LICENSE) for details.

###  Health Score

44

—

FairBetter than 90% of packages

Maintenance89

Actively maintained with recent releases

Popularity16

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~2 days

Total

11

Last Release

54d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/213107296?v=4)[Link Robins](/maintainers/linkrobins)[@linkrobins](https://github.com/linkrobins)

### Embed Badge

![Health badge](/badges/linkrobins-referral/health.svg)

```
[![Health](https://phpackages.com/badges/linkrobins-referral/health.svg)](https://phpackages.com/packages/linkrobins-referral)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12128.3k](/packages/flarum-lang-russian)[fof/byobu

Well integrated, advanced private discussions.

59120.6k14](/packages/fof-byobu)[flarum/tags

Organize discussions into a hierarchy of tags and categories.

38770.5k158](/packages/flarum-tags)[fof/discussion-language

Specify the language a discussion is written in &amp; sort by language

1034.8k7](/packages/fof-discussion-language)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1938.7k](/packages/flarum-lang-french)[fof/best-answer

Mark a post as the best answer in a discussion

25154.0k22](/packages/fof-best-answer)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
