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
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
Hello Yassine,
Are you able to share a bit more about the config setting you are looking to add?
Also, this previous Post may contain some clues to help you meet your requirements: Re: Alter $sugar_config on a per session/user basis.
Regards,
Dan Kallish
Advanced Support Engineer
SugarCRM Support
Learning Resources: http://support.sugarcrm.com | http://university.sugarcrm.com | http://community.sugarcrm.com
Hi Dan,
I think i solved this i was trying to save a synctoken for some users so i used the custom fields to achieve this
but just for curiosity can we add let say a custom panel for each user in the user management and there we can add some specific settings?
Thanks
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