3 final class PhabricatorSettingsAdjustController
4 extends PhabricatorController
{
6 public function handleRequest(AphrontRequest
$request) {
7 $viewer = $this->getViewer();
9 $preferences = PhabricatorUserPreferences
::loadUserPreferences($viewer);
11 $editor = id(new PhabricatorUserPreferencesEditor())
13 ->setContentSourceFromRequest($request)
14 ->setContinueOnNoEffect(true)
15 ->setContinueOnMissingFields(true);
17 $key = $request->getStr('key');
18 $value = $request->getStr('value');
21 $xactions[] = $preferences->newTransaction($key, $value);
23 $editor->applyTransactions($preferences, $xactions);
25 return id(new AphrontAjaxResponse())->setContent(array());