@Override
    public void userModified(User user, Map<String,Object> params) {
        if ("nameModified".equals(params.get("type"))) {

            for (Group group : getSharedGroups(user.getUsername())) {
                ArrayList<JID> groupUsers = new ArrayList<>();
                groupUsers.addAll(group.getAdmins());
                groupUsers.addAll(group.getMembers());

                for (JID groupUser : groupUsers) {
                    rosterCache.remove(groupUser.getNode());
                }
            }
        }
    }
A new user has been created so members of public shared groups need to have
their rosters updated. Members of public shared groups need to have a roster
item with subscription FROM for the new user since the new user can see them.

@param newUser the newly created user.
@param params event parameters.
xmppserver/src/main/java/org/jivesoftware/openfire/roster/RosterManager.java