server/settings/ajax/removegroup.php

15 lines
316 B
PHP
Raw Normal View History

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