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.
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.