diff options
author | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-25 23:23:56 +0100 |
---|---|---|
committer | Bernhard Posselt <nukeawhale@gmail.com> | 2013-03-25 23:24:47 +0100 |
commit | 866f5eef01f95c692061acac7a6946db3949e61b (patch) | |
tree | 2ad83bab23b4d0201ea7373683c11eeb08ffb90d /controller | |
parent | 18680c8c448bc296b649c7eaa745468c301bff0f (diff) |
fix bad setter usage
Diffstat (limited to 'controller')
-rw-r--r-- | controller/usersettingscontroller.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/controller/usersettingscontroller.php b/controller/usersettingscontroller.php index 157dee7ff..db87276f8 100644 --- a/controller/usersettingscontroller.php +++ b/controller/usersettingscontroller.php @@ -45,10 +45,9 @@ class UserSettingsController extends Controller { */ public function read(){ $userId = $this->api->getUserId(); - $showAll = $this->api->getUserValue($userId, 'showAll'); - + $showAll = $this->api->getUserValue('showAll'); $params = array( - 'showAll' => $showAll === 'true' + 'showAll' => $showAll === '1' ); return $this->renderJSON($params); @@ -62,7 +61,7 @@ class UserSettingsController extends Controller { */ public function show(){ $userId = $this->api->getUserId(); - $this->api->setUserValue($userId, 'showAll', true); + $this->api->setUserValue('showAll', true); return $this->renderJSON(); } @@ -75,7 +74,7 @@ class UserSettingsController extends Controller { */ public function hide(){ $userId = $this->api->getUserId(); - $this->api->setUserValue($userId, 'showAll', false); + $this->api->setUserValue('showAll', false); return $this->renderJSON(); } |