js/cloudmine.js
function(auth, password, options) {
      if (isObject(auth)) options = password;
      else auth = {email: auth, password: password}
      options = opts(this, options);
      options.applevel = true;

      var config = {
        action: 'account',
        type: 'DELETE',
        options: options,
        processResponse: APICall.basicResponse
      };

      // Drop session if we are referring to ourselves.
      if (auth.email == this.options.email) {
        this.options.session_token = null;
        this.options.email = null;

        if (options.savelogin) {
          store('email', null, this.options.appid);
          store('username', null, this.options.appid);
          store('session_token', null, this.options.appid);
        }
      }

      if (auth.password) {
        // Non-master key access
        config.data = JSON.stringify({
          email: auth.email,
          username: auth.username,
          password: auth.password
        })
      } else {
        // Master key access
        config.action += '/' + auth.email;
      }

      return new APICall(config);
    }
function(auth, password, options) {
      if (isObject(auth)) options = password;
      else auth = {email: auth, password: password}
      options = opts(this, options);
      options.applevel = true;

      var config = {
        action: 'account',
        type: 'DELETE',
        options: options,
        processResponse: APICall.basicResponse
      };

      // Drop session if we are referring to ourselves.
      if (auth.email == this.options.email) {
        this.options.session_token = null;
        this.options.email = null;

        if (options.savelogin) {
          store('email', null, this.options.appid);
          store('username', null, this.options.appid);
          store('session_token', null, this.options.appid);
        }
      }

      if (auth.password) {
        // Non-master key access
        config.data = JSON.stringify({
          email: auth.email,
          username: auth.username,
          password: auth.password
        })
      } else {
        // Master key access
        config.action += '/' + auth.email;
      }

      return new APICall(config);
    }
function ( auth , password , options ) { if ( isObject ( auth ) ) options = password ; else auth = { email : auth , password : password } options = opts ( this , options ) ; options . applevel = true ; var config = { action : 'account' , type : 'DELETE' , options : options , processResponse : APICall . basicResponse } ; // Drop session if we are referring to ourselves. if ( auth . email == this . options . email ) { this . options . session_token = null ; this . options . email = null ; if ( options . savelogin ) { store ( 'email' , null , this . options . appid ) ; store ( 'username' , null , this . options . appid ) ; store ( 'session_token' , null , this . options . appid ) ; } } if ( auth . password ) { // Non-master key access config . data = JSON . stringify ( { email : auth . email , username : auth . username , password : auth . password } ) } else { // Master key access config . action += '/' + auth . email ; } return new APICall ( config ) ; }
Delete a user.
If you are using the master api key, omit the user password to delete the user.
If you are not using the master api key, provide the user name and password in the corresponding
email and password fields.

@param {object} data An object that may contain email / username fields and optionally a password field.
@param {object} [options] Override defaults set on WebService. See WebService constructor for parameters.
@return {APICall} An APICall instance for the web service request used to attach events.

@function
@name deleteUser
@memberOf WebService.prototype
 
Delete a user.
If you are using the master api key, omit the user password to delete the user.
If you are not using the master api key, provide the user name and password in the corresponding
email and password fields.

@param {string} email The email of the user to delete. If using a master key use a user id.
@param {string} password The password for the account. Omit if using a master key.
@param {object} [options] Override defaults set on WebService. See WebService constructor for parameters.
@return {APICall} An APICall instance for the web service request used to attach events.

@function
@name deleteUser^2
@memberOf WebService.prototype
Delete a user . If you are using the master api key omit the user password to delete the user . If you are not using the master api key provide the user name and password in the corresponding email and password fields .