[dev] Auth custom hook

Oliver Kuhl okuhl at netcologne.de
Fri Mar 21 17:41:03 PST 2003


Hi!

I actually try to add a custom hook function for the authentication to map 
email-aliases to the according username. I tried to patch horde/lib/Auth.php in 
function authenticate just before _authenticate is called, but the hook doesn't 
seem to work. 

global $conf;       

if (!empty($conf['hooks']['aliastousername'])) {
    require_once HORDE_BASE . '/config/hooks.php';    
    if (function_exists('_horde_hook_aliastousername')) {
        $userID = call_user_func('_horde_hook_aliastousername', $userID);
    }              
}

I placed another $conf['hooks'] in my config:
$conf['hooks']['aliastousername'] = true;

I'm not sure what is called here and in which order. I'm using imp for 
authentication. Did I miss anything?

Thx.

Gruss,
   Ollie.


More information about the dev mailing list