removegroup.php 343 B

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