"error", "data" => array( "message" => "Authentication error" ))); exit(); } $username = $_POST["username"]; $quota= OC_Helper::computerFileSize($_POST["quota"]); // Return Success story OC_Preferences::setValue($username,'files','quota',$quota); echo json_encode( array( "status" => "success", "data" => array( "username" => $username ,'quota'=>$quota))); ?>