modules/orionode/lib/metastore/fs/store.js
function(id, callback) {
		if(this._options.configParams.get('orion.single.user')) {
			return callback(new Error("The default user cannot be deleted in single user mode"));
		}
		let userLocation = getUserRootLocation(this._options, id);
		fs.access(userLocation, (err) => {
			if(err) {
				return callback(err);
			}
			rimraf(userLocation, (err) => {
				if(err) {
					return callback(err);
				}
				callback();
			});
		});
	}
function(id, callback) {
		if(this._options.configParams.get('orion.single.user')) {
			return callback(new Error("The default user cannot be deleted in single user mode"));
		}
		let userLocation = getUserRootLocation(this._options, id);
		fs.access(userLocation, (err) => {
			if(err) {
				return callback(err);
			}
			rimraf(userLocation, (err) => {
				if(err) {
					return callback(err);
				}
				callback();
			});
		});
	}
function ( id , callback ) { if ( this . _options . configParams . get ( 'orion.single.user' ) ) { return callback ( new Error ( "The default user cannot be deleted in single user mode" ) ) ; } let userLocation = getUserRootLocation ( this . _options , id ) ; fs . access ( userLocation , ( err ) => { if ( err ) { return callback ( err ) ; } rimraf ( userLocation , ( err ) => { if ( err ) { return callback ( err ) ; } callback ( ) ; } ) ; } ) ; }
Deletes the given user and calls the callback. If the server is launched in single user mode
the call immediately callsback with an error. The default single user mode user cannot delete themselves.
@param {string} id The user id to delete
@param {fn(err)} callback The function callback
@callback
Deletes the given user and calls the callback . If the server is launched in single user mode the call immediately callsback with an error . The default single user mode user cannot delete themselves .