Remove a user from communities 

Use an administrative command to remove a specified user from the membership of their communities and subcommunities.


Before starting


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.


Procedure


To remove a specified user from their community and subcommunity membership...

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      execfile("communitiesAdmin.py")

      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.

  2. Use the following command:

      CommunitiesService.removeAllMembershipByDirectoryUuid(String directoryUuid)

        Removes the specified user from any communities and subcommunities to which they belong.

        The command takes a single parameter:

        directoryUuid

          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.

        • CommunitiesMemberService.getMemberExtIdByEmail("email")

        • CommunitiesMemberService.getMemberExtIdByLogin("login")

        For example:

        CommunitiesService.removeAllMembershipByDirectoryUuid("91b3897d-b4f8-4d05-3621-50bcaa22d300")


Parent topic

Manage membership in Communities

Related concepts
Manage users

+

Search Tips   |   Advanced Search