removegroup.php 316 B

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