removegroup.php 362 B

123456789101112131415161718
  1. <?php
  2. // Init owncloud
  3. require_once('../../lib/base.php');
  4. OC_JSON::checkAdminUser();
  5. OCP\JSON::callCheck();
  6. $name = $_POST["groupname"];
  7. // Return Success story
  8. if( OC_Group::deleteGroup( $name )){
  9. OC_JSON::success(array("data" => array( "groupname" => $name )));
  10. }
  11. else{
  12. OC_JSON::error(array("data" => array( "message" => "Unable to delete group" )));
  13. }