You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nextcloud-server/settings/ajax/setquota.php

18 lines
439 B

<?php
// Init owncloud
require_once('../../lib/base.php');
OC_JSON::checkAdminUser();
$username = $_POST["username"];
//make sure the quota is in the expected format
$quota= OC_Helper::computerFileSize($_POST["quota"]);
$quota=OC_Helper::humanFileSize($quota);
// Return Success story
OC_Preferences::setValue($username,'files','quota',$quota);
OC_JSON::success(array("data" => array( "username" => $username ,'quota'=>$quota)));
?>