Commit cbe3df3b authored by Brian Major's avatar Brian Major
Browse files

s1890 - fixed to remove user member

parent 9c6e670f
Loading
Loading
Loading
Loading
+5 −1
Original line number Original line Diff line number Diff line
@@ -99,7 +99,11 @@ public class RemoveUserMemberAction extends AbstractGroupAction
        Group group = groupPersistence.getGroup(this.groupName);
        Group group = groupPersistence.getGroup(this.groupName);


        Principal userPrincipal = AuthenticationUtil.createPrincipal(this.userID, this.userIDType);
        Principal userPrincipal = AuthenticationUtil.createPrincipal(this.userID, this.userIDType);
        User toRemove = getUserPersistence().getUser(userPrincipal);

        User user = getUserPersistence().getAugmentedUser(userPrincipal);
        User toRemove = new User();
        toRemove.getIdentities().addAll(user.getIdentities());

        if (!group.getUserMembers().remove(toRemove))
        if (!group.getUserMembers().remove(toRemove))
        {
        {
            throw new MemberNotFoundException();
            throw new MemberNotFoundException();