Magic Login Linkfor WHMCS · Documentation
v2.5.0

Requirements & Install

From upload to first magic link in five minutes — no CLI steps, no manual SQL.


Requirements

  • WHMCS 8.x or 9.x.
  • A web server with PHP and MySQL/MariaDB (the database used by WHMCS).
  • WHMCS’ native Single Sign-On feature available — the actual login is performed through the CreateSsoToken local API.
  • Directory write permissions on WHMCS_ROOT/modules/addons/MagicLink/templates_c/ (compiled Smarty templates, created automatically at runtime).
  • The standard WHMCS daily cron job configured, for automatic token and activity-log pruning.
  • A valid license key — entered in the module settings after activation. The key is emailed after purchase and is also available in the client area under Account → My Products → manage product.
License required — after activating the module, click Configure and enter the License key you received by email (or from the client area: Account → My Products → manage product). The module will not run until a valid key is saved.

Install

1. Upload the module files

Copy the whole MagicLink folder to your WHMCS installation:

WHMCS_ROOT/modules/addons/MagicLink

So you end up with:

WHMCS_ROOT/modules/addons/MagicLink/
    MagicLink.php
    hooks.php
    lang/             ← English language strings
    lib/              ← Admin / Client controllers + HardSoftCode helpers
    templates/        ← admin and client templates + client CSS
    templates_c/      ← compiled Smarty templates (created automatically)

2. Activate the addon

In the WHMCS admin area go to Configuration → System Settings → Addon Modules, find Magic Login Link and click the Activate button.

3. Enter your license key

Click Configure, paste the License key you received by email (or from the client area: Account → My Products → manage product) and save. The module validates the key automatically and will not run until a valid key is saved.

4. Grant admin permissions

Under the addon’s Permissions tab, grant access to the admin roles that should be able to open the module and send magic links.

5. Open the module

Click the module name to open it. You land on the Dashboard.

What activation does — creates the hsc_magiclink, hsc_magiclink_activity_logs, hsc_magiclink_user_stats, hsc_magiclink_rate_limits and hsc_magiclinkconfig tables, seeds the default configuration, and installs the Magic Link Request and Magic Link Security Alert email templates.

6. (Optional) Configure

Open the module’s Configuration page to review token expiry, rate limiting, fingerprint binding, security alerts and pruning retention. See Configuration.

Upgrading from an earlier version

Upgrades are automatic. Take a database backup, upload the new MagicLink folder over the old one, then open Addon Modules — WHMCS runs the MagicLink_upgrade routine, which:

  • migrates legacy integer token states (0/1) to string states (active/used),
  • adds the user_agent fingerprint column and the BindUserAgent setting,
  • ensures both email templates exist,
  • seeds the v2.4 / v2.5 configuration settings,
  • creates the activity logs table and its pruning setting.
Nothing is removed during an upgrade — tables are only dropped on deactivation when the “Delete Module Database” option is enabled.