Difference between revisions of "Pandora - Update User Setting"
From SmartWiki
(Created page with 'This function will update a single user record or create a new user record. usersetting_update(flag,callbackfunc,userid,key,value) {| border="1" !Parameter !Description |- |''…') |
|||
Line 38: | Line 38: | ||
==Example== | ==Example== | ||
− | |||
function updatelanguage() { | function updatelanguage() { | ||
ss_developer_key="745757jj3389dl8783"; | ss_developer_key="745757jj3389dl8783"; | ||
var rs=usersetting_update(false,"",@me.userid@,"DEFAULT-LANG",2); | var rs=usersetting_update(false,"",@me.userid@,"DEFAULT-LANG",2); | ||
− | alert("Your language preference has been updated. Please log out and back in for the change to take effect."); | + | alert("Your language preference has been updated to French. Please log out and back in for the change to take effect."); |
} | } | ||
[[Category: Pandora]] | [[Category: Pandora]] |
Revision as of 10:28, 28 March 2011
This function will update a single user record or create a new user record.
usersetting_update(flag,callbackfunc,userid,key,value)
Parameter | Description |
---|---|
Flag | Asynchronous processing Flag
Set to False for synchronous processing. Set to True for asynchronous processing. |
Callbackfunc | User created Java function to manage the callback from an asynchronous function. |
userid | userid of the user to be updated |
key | Key to the setting to be updated |
value | The value to be written to the database |
Notes
Key and Value options
- Key: DEFAULT-LANG - user's language preference
- Values:
- 1 = English
- 2 = French (Canada)
- 3 = Traditional Chinese
- 4 = German
- 6 = French (France)
- 7 = Japanese
- 8 = Finnish
- 9 = Spanish (Ecuador)
- 10 = Viatnamese
Example
function updatelanguage() { ss_developer_key="745757jj3389dl8783"; var rs=usersetting_update(false,"",@me.userid@,"DEFAULT-LANG",2); alert("Your language preference has been updated to French. Please log out and back in for the change to take effect."); }