/** * set the quota of a user * @param string $format * @param string $user * @param string $quota * @return string xml/json */ private static function quotaSet($format, $user, $quota) { $login = OC_OCS::checkpassword(); if (OC_Group::inGroup($login, 'admin')) { // todo // not yet implemented // add logic here error_log('OCS call: user:'******' quota:' . $quota); $xml = array(); $txt = OC_OCS::generatexml($format, 'ok', 100, '', $xml, 'cloud', '', 1, 0, 0); echo $txt; } else { echo self::generateXml('', 'fail', 300, 'You don´t have permission to access this ressource.'); } }
/** * delete private data referenced by $key and generate the xml for ocs * @param string $format * @param string $app * @param string $key * @return string xml/json */ private static function privateDataDelete($format, $app, $key) { if ($key == "" or $app == "") { return; //key and app are NOT optional here } $user = OC_OCS::checkpassword(); if (OC_OCS::deleteData($user, $app, $key)) { echo OC_OCS::generatexml($format, 'ok', 100, ''); } }