blob: d4e3c58ac113d91f19fe8dd2ba72367c404dd402 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<?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)));
?>
|