[RCD] api load_config problem?

Thomas Bruederli roundcube at gmail.com
Fri Nov 6 10:39:54 CET 2009


Cor Bosman wrote:
> The plugin allows users to override $rcmail_config['variable']  using  
> checkboxes. The problem is that in user_preferences hook I always get  
> the value from load_config, never the user override value.
> In login_after I do get the user's value. I know the values are saved  
> correctly in save_preferences as I can see the right values in the DB  
> for specific users.  Im simply using rcmail::get_instance()->config- 
>  >get('variable');
> 
> All of this works fine if I add the default values to the main.inc.php  
> instead of my own config.inc.php
> 
> Am i just overseeing something trivial?

I see the problem: in rcmail::startup()
we first call
  $this->set_user(new rcube_user($_SESSION['user_id']));
which also loads the user prefs into the config object
and later on (in index.php) we initialize the plugins which then load their
static configuration again over the existing one.

This is certainly something we have to change.

~Thomas
_______________________________________________
List info: http://lists.roundcube.net/dev/



More information about the Dev mailing list