[horde] Changing prefs globally

Kevin Konowalec kevin at ualberta.net
Tue Aug 23 11:47:57 PDT 2005


On Aug 23, 2005, at 12:21 PM, Craig White wrote:

> On Tue, 2005-08-23 at 11:47 -0600, Kevin Konowalec wrote:
>
>> On Aug 23, 2005, at 11:39 AM, Jan Schneider wrote:
>>
>>
>>> Zitat von Kevin Konowalec <kevin at ualberta.net>:
>>>
>>>
>>>
>>>> I got a message from our mailserver admin that the sent mail folder
>>>> needs to change.  In the imp/config/prefs.php file there is the
>>>> following:
>>>>
>>>> // sent mail folder
>>>> $_prefs['sent_mail_folder'] = array(
>>>>     'value' => 'sent-mail',
>>>> // For Exchange server uncomment the line below and delete the line
>>>> above
>>>> //    'value' => 'Sent Items',
>>>>     'locked' => false,
>>>>     'shared' => false,
>>>>     'type' => 'implicit');
>>>>
>>>>
>>>> The way I understand it, this is now set for all my users in their
>>>> individual prefs.  If I change it, how do I apply the change across
>>>> the whole database (mySQL)?
>>>>
>>>>
>>>
>>> You need a script for that, because they are stored in the  
>>> serialized
>>> identities.
>>>
>>> Jan.
>>>
>>
>>
>> Has anyone written anything like this?  I'd hate to have to reinvent
>> the wheel...  Of course it'd be handy to have a script that could
>> take an attribute name and value and blast it into the serialized
>> identities across the board....
>>
> ----
> I got pretty far on it a few months back but I never finished it.
>
> It's really just an sql command - in your case, I would think that you
> could simply delete the existing values and then it would go back  
> to the
> 'prefs.php' for value.
>
> I think something like below should do it for mysql (untested) - the
> first statement giving you a clue of what it will find and delete.
>
> mysql> select * from horde_prefs where pref_name = "sent_mail_folder";
> mysql> delete all from horde_prefs where pref_name =  
> "sent_mail_folder";
>
> Craig


Thanks Craig!  I get an empty set when I try that command.

I looked at my own prefs and I can see that the sent mail folder  
value is serialized in the "identities" attribute.  So it's not just  
a simple replacement of that particular field (if only it were that  
simple).

It's interesting that not all users have that 'identities'  
attribute.  If they don't, does imp look at the prefs.php file?





More information about the horde mailing list