[horde] I'm new and i've got some questions....

mbydalek at mobilemini.com mbydalek at mobilemini.com
Mon Jan 24 06:41:52 PST 2005



> -----Original Message-----
> From: horde at marcrisse.name [mailto:horde at marcrisse.name]
> Sent: Monday, January 24, 2005 6:00 AM
> To: horde at lists.horde.org
> Subject: [horde] I'm new and i've got some questions....
> 
> hi...
> 
> i've got a horde installation which stores the user_prefs in a mysql
> table.
> 
> now i want to configure horde global by using the ***/config/prefs.php
> 
> my first problem is, that in my database there are values like:
> pref_uid    pref_scope  ref_name   	        pref_value
> xrisse      mnemo  	display_notepads  	a:1:{i:0;s:6:"xrisse";}
> xrisse      horde  	default_share  	        xrisse
> xrisse      nag         display_tasklists  	a:1:{i:0;s:6:"xrisse";}
> etc...
> 
> now i want to set up the defauls for all users by editing the prefs.php.
> but witch variable contains the username?

The 'pref_uid' field contains the Horde username.

> at the table there are some variables which are containing my userame hard
> coded...
> 
> are there some variables like a:1:{i:0;s:6:"$USER";} or can i get the
> actual ly username with getAuth()??

Not sure exactly what you are saying, but you can use getAuth() to get the
current user that's logged in.

> 
> or how can i set these preferences globaly?

You need to change the /config/prefs.php for whichever application you want
the global preferences set for.

The thing you need to know is this, if there isn't a pref for a user in
whichever backend you are storing them, then Horde looks at the prefs.php.
So, if you want to change everyone's prefs, just delete which pref you want
to "reset" from the database after making the changes to the
config/prefs.php  That way, the next time they login, it will use the
defaults.

-Mike



More information about the horde mailing list