[horde] passwd hook problem
Manilal K M
libregeek at gmail.com
Wed Apr 1 09:35:06 UTC 2009
2009/4/1 Neil Wilson <neilw at dcdata.co.za>:
> 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
>
<Quote from the Passwd setup page>
$conf[hooks][full_name]
If this is checked, the full user name is used to change the password,
the user name without the domain part otherwise. This setting is
overridden by enabling the hook below.
<end of quote>
I don't think you may require a hook for this. Try this:
$conf['hooks']['full_name'] = false;
$conf['hooks']['default_username'] = false;
$conf['hooks']['username'] = false;
$conf['hooks']['userdn'] = false;
Note: I have never used poppassd.
regards
--
Manilal K M : മണിലാല് കെ എം.
http://libregeek.blogspot.com
More information about the horde
mailing list