[horde] passwd hook problem

Neil Wilson neilw at dcdata.co.za
Wed Apr 1 06:23:46 UTC 2009


Hi guys,

I've setup horde-webmail-1.2.2 on a new server and installed passwd for
changing passwords using poppassd.

Poppassd works perfectly on the command line.

I've noticed that by default the @domain is being added onto the
usernames when I try and reset the password.

I've tried enabling the following hook in horde/config/hooks.php to trip
off the @domain.co.za part


if (!function_exists('_username_hook_tobackend')) {
     function _username_hook_tobackend($userID)
     {
         $vdomain = getenv('HTTP_HOST');
         $vdomain = preg_replace('|^mail\.|i', '', $vdomain);
         $vdomain = '@' . String::lower($vdomain);

         if (substr($userID, -strlen($vdomain)) == $vdomain) {
             $userID = substr($userID, 0, -strlen($vdomain));
         }

         return $userID;
     }
}


and then in my passwd/config/conf.php


$conf['hooks']['full_name'] = true;
$conf['hooks']['default_username'] = false;
$conf['hooks']['username'] = true;
$conf['hooks']['userdn'] = false;

and yet when I try to reset a password I get ...

Hook _passwd_hook_username in application passwd not called.

I've search around and this appears to all be correct, so please could
someone point me in the right direction.

Any help will be appreciated.

Thanks.

Regards.

Neil








This email and all contents are subject to the following disclaimer:
http://www.dcdata.co.za/emaildisclaimer.html



More information about the horde mailing list