Feature Requests
Share ideas, discuss and vote on requests from other users in community
 
This object is in archive! 

Adminarea-login hook

Niels Meijer shared this idea 4 years ago
Under Consideration

I've been thinking about this for a while now, and I think it could benefit quite a few...

There is a hook that is called after you login, but what about a hook that is called before you login!

The hook "PreAdminLogin" can/should pass variables such as username and password.

When the hook does not return anything it runs the code, and then continues to use the default WHMCS authentication method after, as it always does.

If it returns false, you'll get an error message, and if you return the unique ID of the admin (yes you will still need to add admins to WHMCS manually or have this done via a script).

This will give the hook the ability to let users handle their own authentication and maybe even add more security measurements pre-login.

Example:

function PreAdminLogin($vars) {

$vars["username"];

$vars["password"];

//use oauth, ldap, or any custom application to handle authentication.

return 16; //adminid

}