Where does Sugar store users' locale settings in database?

Hi Experts,

SugarCRM CE 6.5.14

I want to keep all my users local settings (Time zone, date & time format, currencies etc...) are same.

I tried to find where it stores in DB but failed.

Please let me know if any of you have known already.

Thanks in advance.

-Uday
Parents
  • Is there a way to decode the preference's content? I need to get each users preferred currency
  • Hi All,


    I got one solution, which is working in my case.

    In CRM database there is a table called 'user_preferences', which holds all the user related preferences like timezone etc.

    In this table there is one field called category, the category type 'global' having all the required information.

    The data in this field is serialized and encrypted(base64 encryption).
    For each user in the CRM, one entry will be there for this 'global' category.

    I will add sample code which I used in my case.

    try {

    // Get 'global' content value from db for the user
    $db_value = 'serialized_encrypted_array_data';

    // Get serialized data
    $serialized_data = base64_decode($db_value);

    // Unserialize the data
    $result = unserialize($serialized_data);

    // Show the unserialized data
    echo "<pre>";
    print_r($result);
    echo "</pre>";

    $timezone      = $result['timezone'];
    $date_format = $result['datef'];
    $time_format = $result['timef'];

    } catch (Exception $ex) {
    echo 'Caught exception: ', $ex->getMessage(), "\n";
    }

    Hope this helps!.

    Thank you.

Reply
  • Hi All,


    I got one solution, which is working in my case.

    In CRM database there is a table called 'user_preferences', which holds all the user related preferences like timezone etc.

    In this table there is one field called category, the category type 'global' having all the required information.

    The data in this field is serialized and encrypted(base64 encryption).
    For each user in the CRM, one entry will be there for this 'global' category.

    I will add sample code which I used in my case.

    try {

    // Get 'global' content value from db for the user
    $db_value = 'serialized_encrypted_array_data';

    // Get serialized data
    $serialized_data = base64_decode($db_value);

    // Unserialize the data
    $result = unserialize($serialized_data);

    // Show the unserialized data
    echo "<pre>";
    print_r($result);
    echo "</pre>";

    $timezone      = $result['timezone'];
    $date_format = $result['datef'];
    $time_format = $result['timef'];

    } catch (Exception $ex) {
    echo 'Caught exception: ', $ex->getMessage(), "\n";
    }

    Hope this helps!.

    Thank you.

Children
No Data