# before_adminlogin

Admin is attempting to log in. You can use this hook to authenticate admin against external database/auth service. To do so, after successful auth, simply return admin id that HostBill should log in. ie. return 10; //login admin with id=10 (hb_admin_access.id=10). If admin has provided wrong credentials – don’t return any value – this way HostBill will fall-back to its internal authentication methods. Return value below 0 to indicate error/block HostBill login

# Hook parameter

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: 3/17/2023, 8:40:19 AM