deleteUser

// Using callbacks (NodeJS or Web Browser)
kuzzle
  .security
  .deleteUser('myuser', function(error, result) {

  });

// Using promises (NodeJS)
kuzzle
  .security
  .deleteUserPromise('myuser')
  .then((result) => {

  });
kuzzle
  .security
  .deleteUser("myuser", new ResponseListener<String>() {
    @Override
    public void onSuccess(String userName) {

    }

    @Override
    public void onError(JSONObject error) {

    }
  });
<?php

use \Kuzzle\Kuzzle;

$kuid = 'myUser';

$kuzzle = new Kuzzle('localhost');

try {
  $kuzzle->security()->deleteUser($kuid);
}
catch (ErrorException $e) {

}

Callback response

"deleted user identifier"

Delete the provided user.


deleteUser(id, [options], [callback])

ArgumentsTypeDescription
idstringUnique user identifier to delete
optionsJSON ObjectOptional parameters
callbackfunction(Optional) Callback handling the response

Options

OptionTypeDescriptionDefault
queuablebooleanMark this request as (not) queuabletrue

Return value

Returns the Security object to allow chaining.


Callback response

Resolves the user id which has been deleted.