2011-04-16 23:04:23 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Init owncloud
|
|
|
|
require_once('../../lib/base.php');
|
|
|
|
|
2011-09-23 20:22:59 +00:00
|
|
|
OC_JSON::checkAdminUser();
|
2012-07-07 13:27:04 +00:00
|
|
|
OCP\JSON::callCheck();
|
2011-04-16 23:04:23 +00:00
|
|
|
|
2011-04-17 11:15:55 +00:00
|
|
|
$username = $_POST["username"];
|
2011-04-16 23:04:23 +00:00
|
|
|
|
|
|
|
// Return Success story
|
2011-07-29 19:36:03 +00:00
|
|
|
if( OC_User::deleteUser( $username )){
|
2011-09-23 20:22:59 +00:00
|
|
|
OC_JSON::success(array("data" => array( "username" => $username )));
|
2011-04-16 23:04:23 +00:00
|
|
|
}
|
|
|
|
else{
|
2011-09-23 20:22:59 +00:00
|
|
|
OC_JSON::error(array("data" => array( "message" => "Unable to delete user" )));
|
2011-04-16 23:04:23 +00:00
|
|
|
}
|