Skip to content

websavers/WHMCS-Hook-Client-Login-Notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WHMCS-Hook-Client-Login-Notifications

Client area login notifications for WHMCS Notifications are only sent when the IP is different from their last login.

Localizations / Translations

To use localizations in the email notification, follow these steps:

  1. Follow the WHMCS guide to creating a custom email template.
  2. Set the Email Type to 'General' and the Unique name must be: User Login From Different IP
  3. Example Subject: "User Login from new IP {$user_ip} ({$user_hostname})"
  4. Example Message:
A user just accessed your account from a different IP than usual:

• Name: {$user_fullname}
• Email: {$user_email}
• IP Address: {$user_ip}
• City: {$user_city}
• Hostname: {$user_hostname}

You can manage the users allowed to access your account here: {$whmcs_url}/account/users

You can then set your translations in the email templates translations area.

Original Source Code & Credits

  • Found in the WHMCS forums here.
  • Created by whmcsguru
  • Contributions by brian!
  • Rewritten by websavers

Requirements

  • WHMCS: Backwards compatibility was removed for code readability and so this only works with WHMCS 8.
  • PHP: Tested with PHP 8.1. Probably works with PHP 7.4 and 8.0

IPLocate

This code uses IPLocate which provides 1000 daily requests free. Anything more and you will need to pay them. Given that we only utilize the IPLocate API when an IP has changed since the last user login, the free 1000 daily lookups are probably sufficient for most WHMCS users.

About

Client area login notifications for WHMCS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages