Welcome to mirror list, hosted at ThFree Co, Russian Federation.

setUserSettings.php « ajax « build - github.com/nextcloud/jsxc.nextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bacad7f3aa9543d9e140a860e6b57c29975758d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
<?php
OCP\User::checkLoggedIn ();
OCP\JSON::callCheck ();

$user = OCP\User::getUser ();
$options = OCP\Config::getUserValue($user, 'ojsxc', 'options');
$options = json_decode($options, true);

foreach($_POST as $key => $val) {
	$options[$key] = $val;
}

echo OCP\Config::setUserValue($user, 'ojsxc', 'options', json_encode($options));