summaryrefslogtreecommitdiffstats
path: root/settings/ajax/setquota.php
blob: 5c07285cfcac524f2a94a604094d63f150bd8f39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<?php

// Init owncloud
require_once('../../lib/base.php');

OC_JSON::checkAdminUser();

$username = $_POST["username"];
$quota= OC_Helper::computerFileSize($_POST["quota"]);

// Return Success story
OC_Preferences::setValue($username,'files','quota',$quota);
OC_JSON::success(array("data" => array( "username" => $username ,'quota'=>OC_Helper::humanFileSize($quota))));

?>