removeuser.php 350 B

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