Get Virtualizor

User Settings

Use User Settings API to change your general settings on server.

HTTP Request

https://hostname:4083/index.php?act=usersettings

Parameters

NameTypeValueDescriptionRequired
actGETusersettingsThe action which is specified to carry out specific operationYes
editsettingsPOST1If set then the user settings will be editedYes
languagePOSTlanguageThe language of the panel will be set Eg : polish, englishYes
skinsPOSTskinsThis will set the theme for the panel Eg: Currently selected theme will be “default”Yes theme.Otherwise user can pass name of the custom theme directory under /usr/local/virtualizor/enduser/themes
timezonePOSTtimezoneThis will set the appropriate time zone for the user. Value will range from -12 to +12Yes

For selecting the timezone follow the table given below:

ValueTimezone
-12(GMT -12:00) Eniwetok, Kwajalein
-11(GMT -11:00) Midway Island, Samoa
-10(GMT -10:00) Hawaii
-9(GMT -9:00) Alaska
-8(GMT -8:00) Pacific Time (US & Canada)
-7(GMT -7:00) Mountain Time (US & Canada)
-6(GMT -6:00) Central Time (US & Canada), Mexico City
-5(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima
-4(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz
-3.5(GMT -3:30) Newfoundland
-3(GMT -3:00) Brazil, Buenos Aires, Georgetown
-2(GMT -2:00) Mid-Atlantic
-1(GMT -1:00 hour) Azores, Cape Verde Islands
0(GMT) Western Europe Time, London, Lisbon, Casablanca
1(GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris
2(GMT +2:00) Kaliningrad, South Africa
3(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg
3.5(GMT +3:30) Tehran
4(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi
4.5(GMT +4:30) Kabul
5(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent
5.5(GMT +5:30) Bombay, Calcutta, Madras, New Delhi
6(GMT +6:00) Almaty, Dhaka, Colombo
6.5(GMT +6:30) Yangon, Myanmar
7(GMT +7:00) Bangkok, Hanoi, Jakarta
8(GMT +8:00) Beijing, Perth, Singapore, Hong Kong
9(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk
9.5(GMT +9:30) Adelaide, Darwin
10(GMT +10:00) Eastern Australia, Guam Vladivostok
11(GMT +11:00) Magadan, Solomon Islands, New Caledonia
12(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka

Sample Code

PHP

<?php
    require_once('/usr/local/virtualizor/sdk/enduser.php');

    $key =  '';
    $pass = '';
    $ip = '';
    $admin = new Virtualizor_Enduser_API($ip, $key, $pass);

    $post = array();
    $post['editsettings'] = 1;
    $post['language'] = 'english';
    $post['skins'] = 'default';
    $post['timezone'] = '(GMT -3:30) Newfoundland';

    $output = $admin->usersettings($post);

    print_r(json_encode($output));
?>

Curl

curl -k -X POST -d "editsettings=1&language=polish&skins=default& 
timezone=1" -L 
"https://hostname:4083/index.php?act=usersettings&api=json& 
apikey=your_api_key&apipass=your_api_pass&do=1"

Output

{
    "uid": "321",
    "act": "usersettings",
    "timezone": 1,
    "timenow": "September 23, 2016, 5:38 am",
    "vpsid": "3008",
    "username": "test@test.com",
    "user_type": "2",
    "preferences": {
        "fname": "test",
        "lname": "test",
        "theme": "default",
        "language": "english",
        "timezone": 1
    },
    "url": "index.php?",
    "rdns": {
        "pdnsid": null
    },
    "support_link": "http://softaculous.com",
    "disable_login_logo": 1,
    "title": "Users Settings",
    "done": {
        "msg": "Your settings were saved successfully"
    },
    "skins": {
        "default": "default"
    },
    "languages": {
        "polish": "polish",
        "english": "english",
        "german": "german",
        "chinese": "chinese",
        "portuguese": "portuguese",
        "dutch": "dutch",
        "french": "french"
    },
    "timezones": [-12, -11, -10, -9, -8, -7, -6, -5, -4, -3.5, -3, -2, -1, 0, 1, 2, 3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 8, 9, 9.5, 10, 11, 12],
    "timezone_names": ["(GMT -12:00) Eniwetok, Kwajalein", "(GMT -11:00) Midway Island, Samoa", "(GMT -10:00) Hawaii", "(GMT -9:00) Alaska", "(GMT -8:00) Pacific Time (US & Canada)", "(GMT -7:00) Mountain Time (US & Canada)", "(GMT -6:00) Central Time (US & Canada), Mexico City", "(GMT -5:00) Eastern Time (US & Canada), Bogota, Lima", "(GMT -4:00) Atlantic Time (Canada), Caracas, La Paz", "(GMT -3:30) Newfoundland", "(GMT -3:00) Brazil, Buenos Aires, Georgetown", "(GMT -2:00) Mid-Atlantic", "(GMT -1:00 hour) Azores, Cape Verde Islands", "(GMT) Western Europe Time, London, Lisbon, Casablanca", "(GMT +1:00 hour) Brussels, Copenhagen, Madrid, Paris", "(GMT +2:00) Kaliningrad, South Africa", "(GMT +3:00) Baghdad, Riyadh, Moscow, St. Petersburg", "(GMT +3:30) Tehran", "(GMT +4:00) Abu Dhabi, Muscat, Baku, Tbilisi", "(GMT +4:30) Kabul", "(GMT +5:00) Ekaterinburg, Islamabad, Karachi, Tashkent", "(GMT +5:30) Bombay, Calcutta, Madras, New Delhi", "(GMT +6:00) Almaty, Dhaka, Colombo", "(GMT +6:30) Yangon, Myanmar", "(GMT +7:00) Bangkok, Hanoi, Jakarta", "(GMT +8:00) Beijing, Perth, Singapore, Hong Kong", "(GMT +9:00) Tokyo, Seoul, Osaka, Sapporo, Yakutsk", "(GMT +9:30) Adelaide, Darwin", "(GMT +10:00) Eastern Australia, Guam, Vladivostok", "(GMT +11:00) Magadan, Solomon Islands, New Caledonia", "(GMT +12:00) Auckland, Wellington, Fiji, Kamchatka"],
    "time_taken": "0.107"
}
    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list