It could be done in a theme component with api.decorateWidget if the information you need about the user is available in the helper.attrs property that is passed to the function. This will work if the group you are looking for is the user’s primary_group.