[horde] Changing a conf setting from within a hook?

Jan Schneider jan at horde.org
Fri Aug 11 09:12:37 PDT 2006


Zitat von Barry Flanagan <barryf-lists at flanagan.ie>:

>
>
> Jan Schneider wrote:
>> Zitat von Barry Flanagan <barryf-lists at flanagan.ie>:
>>
>>> Hi,
>>>
>>> If I need to change the value of a conf variable from within a hook, how
>>> do I get Horde to use this value?
>>>
>>> My specific problem is that I need to use a conf setting which depends
>>> on the current user, but conf is read prior to authentication. Therefore
>>> in the postauthenticate hook I want to set this conf variable to its
>>> correct setting. However, even using $GLOBALS['conf']['param'] = does
>>> not seem to work.
>>
>> A bad hack would be to alter $registry->_confCache.
>>
>>
>
>
> Well, in the absence of a good hack, how would I do this? Given a
> variable $conf['group']['param']['filter']? I have tried:
>
> $registry->_confCache['horde']['conf']['group']['params']['filter'] =
>
> and
>
> $registry->_confCache['horde']['group']['params']['filter'] =
>
> but neither seem to work.

Don't try blindly random array keys, var_dump the whole structure,  
analyze it, and set the correct values.

Jan.

-- 
Do you need professional PHP or Horde consulting?
http://horde.org/consulting/



More information about the horde mailing list