/** * Saves LoginLdap config. * * @param string $data JSON encoded config array. * @return array * @throws Exception if user does not have super access, if this is not a POST method or * if JSON is not supplied. */ public function saveLdapConfig($data) { $this->checkHttpMethodIsPost(); Piwik::checkUserHasSuperUserAccess(); $data = json_decode(Common::unsanitizeInputValue($data), true); Config::savePluginOptions($data); return array('result' => 'success', 'message' => Piwik::translate("General_YourChangesHaveBeenSaved")); }