Adding a new config setting in the config class (user specific)

Hi,

how i can add a new config setting in the config class, and i want this config to be user specific so that every user has its own value on that setting

Thanks in advance

Parents Reply
  • You can you UserPreference module to save some setting:

    global $current_user;
    $user_preferences = new UserPreference($current_user);
    $user_preferences->setPreference('preference_name','preference_value','some_preference_identifier'); //set some settings to SESSION
    $user_preferences->savePreferencesToDB(); //set some settings from SESSION to DB
    
    $preferences = $user_preferences->getPreference('preference_name','some_preference_identifier'); //get setting by name
    
Children