summaryrefslogtreecommitdiffstats
path: root/ajax/usersettings.php
diff options
context:
space:
mode:
Diffstat (limited to 'ajax/usersettings.php')
-rw-r--r--ajax/usersettings.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/ajax/usersettings.php b/ajax/usersettings.php
index c01e8e35d..9ddd69f6e 100644
--- a/ajax/usersettings.php
+++ b/ajax/usersettings.php
@@ -15,7 +15,16 @@ OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('news');
OCP\JSON::callCheck();
-// TODO: receive and save user settings
+switch($_POST['show']){
+ case 'all':
+ $showAll = true;
+ break;
+ default:
+ $showAll = false;
+ break;
+}
+// TODO: receive and save user settings
+OCP\Config::setUserValue(OCP\USER::getUser(), 'news', 'showAll', $showAll);
OCP\JSON::success(); \ No newline at end of file