Drupal - WHMCS Authentication integration

The WHMCS AUTH module offers login integration between WHMCS and Drupal. Alters the Drupal login process to authenticate WHMCS users using external API and provides a login block to include in your WHMCS theme. (loginbox.php)

After login if the user hasn't login before it will create a new Drupal user, with "WHMCS user" role assigned, plus an extra WHMCS userid field

Installation instructions:

  1. Upload and extract the files under /sites/all/modules of your Drupal installation, like any other module.
  2. Enable the module at Administration » Modules
  3. Edit your login template file (ex. /client/templates/login.php) and add at the following code at the beginning
    {php}
    $path = substr($_SERVER[REQUEST_URI], 1);
    header("Location: https://www.example.com/user?destination=$path");
    exit();
    {/php}
  4. In your theme you can include also a login block by adding the following code
    {fetch file='http://www.mydomain.com/sites/all/modules/whmcs_auth/loginbox.php'}

    fix url to match your domain and WHMCS installation path

Required module WHMCS API

Download: