Skip to:
Content
Pages
Categories
Search
Top
Bottom

Parent/Child User relationship


  • jonallentx
    Participant

    @jonallentx

    Good Afternoon!
    I think this might be a feature request as I can’t find anything about it anywhere, so I may need to move to Creating & Extending? I’m using BuddyPress for a Scout Troop Members portal. It allows the Patrols to collaborate in a private environment outside of regularly scheduled meetings. However, the issue I’m having is staying compliant with BSA Youth Protection policies that state that at least two adults must be included in any coversation with a Scout. Scout to Scout should be fine, but I need a way to create a child/parent relationship for Scout’s accounts and automatically copy the parent on any messages to the Scout. Anyone have any thoughts?

Viewing 10 replies - 1 through 10 (of 10 total)

  • Venutius
    Moderator

    @venutius

    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?


    jonallentx
    Participant

    @jonallentx

    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.


    jonallentx
    Participant

    @jonallentx

    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.


    Venutius
    Moderator

    @venutius

    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?


    jonallentx
    Participant

    @jonallentx

    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.


    Venutius
    Moderator

    @venutius

    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 );


    Venutius
    Moderator

    @venutius

    In case you need it, I have an xProfile Username Profile Field plugin – https://github.com/Venutius/bp-xprofile-username-field


    jonallentx
    Participant

    @jonallentx

    Thanks. Doesn’t seem to be working for me though. I added it to the extended profile entries, but it doesn’t show up.


    Venutius
    Moderator

    @venutius

    Could you raise an issue on GitHub? We can discuss it there.


    jonallentx
    Participant

    @jonallentx

    Added

Viewing 10 replies - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.
Skip to toolbar