# before_adminlogin

Admin is attempting to log in.

This hook can be used to authenticate admins against an external database or authentication service.

# Return values:

  • Admin ID (integer) - If authentication is successful, return the ID of the admin that HostBill should log in (e.g., return 10; to log in admin with ID 10 from hb_admin_access).
  • 0 - If the system should fall back to default HostBill authentication.
  • -1 - If you want the login to fail immediately with no fallback.

# Hook parameters

An array is passed to hook containing following keys/values (note: if you have custom registration fields they may differ):

Key Type Description
username string Admin-provided username
password string Admin-provided password

# Sample hook files

Last Updated: 5/29/2026, 1:41:48 PM