Members not able to email other groups


Home Forums Front End PM PRO Members not able to email other groups

This topic is: Resolved
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #20421
    David Keene
    Participant

    Hi Shamim

    I am using a plugin called “User Role Editor” to create additional groups i.e “Club Member”, “Instructor”, “Committee Member” where some users are in a number of groups but all as a minimum are in “Club Member”. Users that are in the group called “Club Member” only see the group called “All Members” in the dropdown. I have confirmed that if i add the user to the other groups then the available list of groups in the dropdown are shown.

    Under receipts i have the following
    All Members – {role-unparsed}-Club Member

    Committee Members – {role-unparsed}-Committee Members

    Instructors {role-unparsed}-Instructors

    Your help would be appreciated.

    Oh – Thanks for adding my suggestion called {role-unparsed}-****

    Regards
    Dave

    #20424
    shamim
    Keymaster

    Users can see groups in dropdown which they are member.
    May be i did not understand you properly. can not user see all groups which they are member in dropdown?

    #20439
    David Keene
    Participant

    Hi Shamim

    Thanks for the quick reply. Yes users can see the groups which they are members of in the dropdown. Is it possible to modify the code to allow users in the wordpress group called Club Member to email the groups that have been setup in the backend of Front End PM.

    Basically I have extended the wordpress groups for access control and would like to allow a general club member to be able to email, instructors, committee members or all members.

    I hope this makes sense.

    Regards
    Dave.

    #20444
    shamim
    Keymaster

    You can use fep_get_user_groups filter to show any groups you want.

    #20486
    David Keene
    Participant

    Hi Shamim

    Again thanks for the quick reply, can you please explain how to use fep_get_user_groups

    Regards

    Dave Keene

    #20497
    shamim
    Keymaster

    add following code in your theme’s (child theme’s if you are using) functions.php

    add_filter( 'fep_get_user_groups', function( $user_groups, $user_id ){
        $user_groups['group_slug'] = 'Group Name';
        return $user_groups;
    }, 10, 2);
    

    You can pass any group here. Users will be able to send message to those groups.

    #20538
    David Keene
    Participant

    Thanks Shamim

    For multiple groups do i modify $user_groups[‘group_slug’] = ‘Group Name’; to be ‘Group Name 1’, ‘Group Name 2’, ‘Group Name 3’ or do i need to add the complete block multiple times with the different group names.

    Regards

    Dave

    #20563
    shamim
    Keymaster

    It is just an array. use like array

    
    $user_groups['group_slug'] = 'Group Name';
    $user_groups['group_slug2'] = 'Group Name2';
    $user_groups['group_slug3'] = 'Group Name3';
    
    #21180
    David Keene
    Participant

    Hi Shamim

    Thanks for your help with this issue, i have added the following code but find that one group called instructors appears twice probably because i am in that group as well as opening it up for general users

    /* Added for FRONTEND PM - email groups*/
        add_filter( 'fep_get_user_groups', function( $user_groups, $user_id ){
        $user_groups['committee-members'] = 'Committee Members';
        $user_groups['Instructors'] = 'Instructors';
        return $user_groups;
    }, 10, 2);

    I have attached a screenshot showing the issue.

    hope you can help

    Regards
    Dave.

    Attachments:
    You must be logged in to view attached files.
    #21185
    shamim
    Keymaster

    Group slug is case sensitive. make sure you have used same group slug as you set in group settings page. I think it will be $user_groups['instructors'] = 'Instructors';

    #21196
    David Keene
    Participant

    Hi Shamim

    Again thanks for your help, this solved my problem.

    Regards

    Dave Keene

Viewing 11 posts - 1 through 11 (of 11 total)

You need to purchase ‘Front End PM PRO’ to create topic in this support forum.

If you already purchased ‘Front End PM PRO’ please LOGIN.