This project is not covered by Drupal’s security advisory policy.

For best Views & Rules integration, and bug fixes, please use the latest -dev version. - @hejazee

This module provides users with the ability to refer other users to a site they are registered at. When the new users registers, the referral is recorded.

Users can see a list of users they referred, and the site admin can view more detailed reports.

Basic Functionality

Referral information is recorded for a visitor in a cookie, when either of the following happens:

  • A non-registered visitor clicks on the referral link, or
  • A non-registered visitor visits the profile page of the referring user. This requires the profile page to be visible for anonymous users.

When the visitor registers on the site, the referral information is used to record the referring user's User ID in the database.

The link for referral for each user is displayed in "my account" menu.

Drupal 5 and 6

If the Adsense module is installed and Revenue sharing is enabled, then the referral is used to share the revenue between the referring user and the referred user.

Optionally, points are awarded for the referring user (requires the Userpoints module).

Only active users are counted in referrals. Blocked users, or users not yet approved by the administrator are not counted in referrals.

Drupal 7

Changes from the Drupal 6 version:

  • Forward module integration - enabling the module rewrites the urls sent by the Forward module so the user can get credit.
  • Rules 2 integration:
    - Act on the event of a new referred user being saved
    - Check if a referral record is flagged
    - Check if a user was referred by a another user
    - Flag a referral
    - Unflag a referral
    - Set a new referral
    - Change a referring user
  • Native Userpoints integration has bee taken out, as this is now possible through Rules 2.
  • Triggers have been taken out as well, in favor of Rules.
  • Adsense module integration is no longer included.

Developer API

Any module can implement a hook_referral() to act on the event of a new user registering via a referral. This is useful in many cases. For an example on how to use this, see the included referral_userpoints module.

Reports

On the "my account" page, there is a link to a report on users you have referred.

There are also admin reports under Administer -> Logs.

Two reports are provided:

  • Summary: Lists each user and how many users they referred, and the date of the last referral.
  • Details: Lists each users, and each user they have referred, the date/time of referral, the IP address, and Referral link.

Installation

To install this module, follow the instructions in the README.txt.

Configuration

To enable this module do the following:

1. Go to Administer -> Modules, and enable click.

2. Go to Administer -> Access Control and enable for the roles you want. Users with 'admin referral' permission can view the detailed

Bugs/Features/Patches

If you want to report bugs, feature requests, or submit a patch, please do so at the project page on the Drupal web site.

Original Author

Khalid Baheyeldin of 2bits.com.

Drupal 7 Port

Matt Robison at Louisville Web Group. Find him on Drupal.org.

The authors can also be contacted for paid customizations of this module as well as Drupal consulting, installation, development, and customizations.

Project information

Releases