Use an administrative command to remove a specified user from the membership of their communities and subcommunities.
Before you begin
To use administrative commands, you must use the wsadmin client. See Starting the wsadmin client
for details. The administrative command for removing a user from communities and subcommunities does not require a server restart to take effect, and no file checkout is necessary.
About this task
You can manage community membership to allow for situations in which employees leave the organization and no longer require access to their communities. The CommunitiesService.removeAllMembershipByDirectoryUuid command removes a specified user from all the communities and subcommunities to which they belong.
To remove a specified user from their community and subcommunity membership, complete the following steps.
Parent topic: Managing membership in Communities
- Start the wsadmin client from the following directory of the system on which you installed the Deployment Manager:
is the WebSphere
® Application Server installation directory and <dm_profile_root>
is the Deployment Manager profile directory, typically dmgr01.
You must start the client from this directory or subsequent commands that you enter do not execute correctly. For more information, see Starting the wsadmin client
- Start the Communities Jython script interpreter using the following command:
If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, you must pick the node where the file is stored.
- Use the following command:
Removes the specified user from any communities and subcommunities to which they belong.
The command takes a single parameter:
A string that specifies the directory UUID (external ID) of the user whose membership you want to remove.
If the user is the last owner of a community or subcommunity, they are not removed, and the community or subcommunity is included in the return value for this call. The command returns a vector of hash maps of all the communities and subcommunities where the user was not removed because they are the last owner.
To obtain the directory UUID to use as input into this command, use one of the commands below. Both commands return the user's external ID.