I think at a basic level you need a plugin written. I think whilst the basic functionality could be quite simple this requirement is likely to expand into other areas. Whilst it could potentially affect a lot of people I think it’s too much of an edge case to be written into core.
Would the parents be site members?
Yes. I’m using Paid Membership Pro to create and signup for levels (and block most of the site and all of BuddyPress and bbPress from non-members). The levels are the determination on the groups. There’s Scout, Scout Parent, Adult Leadership and Committee Members. Ideally, any message would go to Scout and the corresponding Scout Parent. Technically speaking, to stay compliant with the Regs I could do a more generic approach as well, such as copying all Adult Leadership members on messages. However, in our Troop the preferred method is to copy the Parent.
Or even if I could copy a specific person I could send a copy of all correspondance to either the Scoutmaster or the Committee Chair. Just as long as ONE other adult is copied it complies with the basic requirements.
So you could put the parental contacts into profile fields and then run a filter on all outgoing email to check the role relationship and copy in the parental contact as appropriate?
That would probably work as long as it could be automated. I suppose the question would be how to implement that? I’m new to BuddyPress.
Well one option would be to set up a parental contact as mandatory profile fields, then run a reminder plugin that gets your scouts to enter those details before they can continue to the site. That’s the easy part.
what you would do would be to trigger a function on the messages_message_before_save
action, this would return to your function the message object of every message before it got saved and processed.
You can get the recipients array from $message_info->recipients
and the person sending the message is get_current_user_id();
You’d want to check the role relationship and if it’s Scout – Scout Leader then you would look up the profile field data using the function xprofile_get_field( $field_id, $user_id, true );
In case you need it, I have an xProfile Username Profile Field plugin – https://github.com/Venutius/bp-xprofile-username-field
Thanks. Doesn’t seem to be working for me though. I added it to the extended profile entries, but it doesn’t show up.
Could you raise an issue on GitHub? We can discuss it there.