[horde] Cannot redeclare class Horde_Hooks
meberhardt at unl.edu.ar
meberhardt at unl.edu.ar
Wed Jun 17 21:34:03 UTC 2015
Sorry, the hook I've modified is horde/hooks.php, not imp.
meberhardt at unl.edu.ar escribió:
> I just uncommented the function authusername in imp/hooks.php and
> modified the value of $vdomain variable.
>
> If I leave the function uncommented but original, it works.
>
> I have a few mail domains in separated IMAP servers. I want to
> append the selected domain in backends to the username: user at domain
>
> Thanks in advance,
>
> Matías
>
>
> Jan Schneider <jan at horde.org> escribió:
>
>>
>> Zitat von meberhardt at unl.edu.ar:
>>
>>> Hi all,
>>>
>>> When I try to enable the authusername horde hook, I get the
>>> following horde error:
>>>
>>> "Cannot redeclare class Horde_Hooks"
>>>
>>> I'm using a modified version of authusername:
>>>
>>> public function authusername ($userId, $toHorde)
>>> {
>>> $domain = $GLOBALS['auth_params']['imp_server_key'];
>>> if ($toHorde) {
>>> return
>>> ltrim(rtrim(Horde_String::lower($userId))) . '@' . $domain;
>>> } else {
>>> return (substr($userId, -strlen($domain)) == $domain)
>>> ?
>>> substr(ltrim(rtrim(Horde_String::lower($userId))), 0,
>>> -strlen($domain))
>>> : ltrim(rtrim(Horde_String::lower($userId)));
>>> }
>>> }
>>>
>>> What I'm doing wrong?
>>
>> You probably have several hooks*.php files. Or you copied hook code
>> from application to another.
>>
>> --
>> Jan Schneider
>> The Horde Project
>> http://www.horde.org/
>> https://www.facebook.com/hordeproject
>>
>> --
>> Horde mailing list
>> Frequently Asked Questions: http://horde.org/faq/
>> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>>
>
>
>
> /* --------------------------------------------------------------- */
> /* Matías A. Eberhardt */
> /* */
> /* Centro de Telemática */
> /* Secretaría General */
> /* UNIVERSIDAD NACIONAL DEL LITORAL */
> /* Pje. Martínez 2652 - S3002AAB Santa Fe - Argentina */
> /* tel +54(342)455-4245 - FAX +54(342)457-1240 */
> /* --------------------------------------------------------------- */
>
> --
> Horde mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: horde-unsubscribe at lists.horde.org
>
/* --------------------------------------------------------------- */
/* Matías A. Eberhardt */
/* */
/* Centro de Telemática */
/* Secretaría General */
/* UNIVERSIDAD NACIONAL DEL LITORAL */
/* Pje. Martínez 2652 - S3002AAB Santa Fe - Argentina */
/* tel +54(342)455-4245 - FAX +54(342)457-1240 */
/* --------------------------------------------------------------- */
More information about the horde
mailing list