Remove a user from communitiesUse an administrative command to remove a specified user from the membership of their communities and subcommunities.
Before you begin
To use administrative commands, 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...
- From the dmgr host:
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, 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.
Parent topicManage membership in Communities
September 21, 2011 by Fernando K
Sep 21, 2011 7:27:12 PM Fernando K Sample code is wrong, it should be removeAllMembershipByDirectoryUuid 1