2011-04-17 03:04:23 +04:00
|
|
|
<?php
|
|
|
|
|
2011-09-24 00:22:59 +04:00
|
|
|
OC_JSON::checkAdminUser();
|
2012-07-07 17:27:04 +04:00
|
|
|
OCP\JSON::callCheck();
|
2011-04-17 03:04:23 +04:00
|
|
|
|
|
|
|
$name = $_POST["groupname"];
|
|
|
|
|
|
|
|
// Return Success story
|
2012-09-04 13:49:50 +04:00
|
|
|
if( OC_Group::deleteGroup( $name )) {
|
2011-09-24 00:22:59 +04:00
|
|
|
OC_JSON::success(array("data" => array( "groupname" => $name )));
|
2011-04-17 03:04:23 +04:00
|
|
|
}
|
|
|
|
else{
|
2012-09-04 13:50:16 +04:00
|
|
|
OC_JSON::error(array("data" => array( "message" => $l->t("Unable to delete group") )));
|
2011-04-17 03:04:23 +04:00
|
|
|
}
|