nextcloud/settings/ajax/removeuser.php

19 lines
350 B
PHP
Raw Normal View History

2011-04-17 03:04:23 +04:00
<?php
// Init owncloud
require_once('../../lib/base.php');
2011-04-17 03:04:23 +04:00
OC_JSON::checkAdminUser();
2011-04-17 03:04:23 +04:00
$username = $_POST["username"];
2011-04-17 03:04:23 +04:00
// Return Success story
2011-07-29 23:36:03 +04:00
if( OC_User::deleteUser( $username )){
OC_JSON::success(array("data" => array( "username" => $username )));
2011-04-17 03:04:23 +04:00
}
else{
OC_JSON::error(array("data" => array( "message" => "Unable to delete user" )));
2011-04-17 03:04:23 +04:00
}
?>