[horde] Disabling a module via a hook

Mike Place mp at xmission.com
Wed Nov 2 15:32:24 PST 2005


Kevin M. Myer wrote:

>Quoting Mike Place <mp at xmission.com>:
>
>  
>
>>Hi,
>>
>>Is it possible to set a registry value via a hook? Specifically, I'm
>>trying to disable certain modules via the result of an SQL lookup. My
>>understanding thus far is that preferences can be changed as well as
>>returning the results of a hook to various applications, but I see no
>>method for modifying information in the session taken from registry.php.
>>Could some kind soul let me know if this is possible, or perhaps give a
>>brief example of how one might do this?
>>    
>>
>
>If you're looking to enable/disable modules on a per-user/group basis, 
>you're better served using the Horde Permissions settings.  What are 
>the expected results of your SQL lookup?  In other words, what is your 
>rationale for wanting to do this?
>
>Kevin
>
>  
>
Hi Kevin,

Thanks for the quick response.

We're migrating mail systems and as a result, we're dropping support for 
writing out procmail rules via the Vacation module and switching to a 
customized version of Ingo that writes them to a DB and then into 
timsieved. However, the migration is taking place over the course of a 
few weeks and as a result, some users will be on the new system while 
others remain on the old. We're routing IMAP connections by doing 
lookups to a MySQL database and returning simply a username if a user 
has been migrated and null if a user has not been migrated.  I have 
hooks running that work quite well to set the quota type and the address 
of the various mail servers based on the result of this lookup.

Basically, what I want to be able to do now is to present a link to the 
Vacation module if a user is old the old mail system and I want the link 
removed if a user is on the new system. Thus, it isn't viable for us to 
really go to the trouble of tying all of this into the Horde user 
management system if it isn't necessary.

-mp


More information about the horde mailing list