Home › Forums › Front End PM PRO › Members not able to email other groups
Tagged: Group Messaging
- This topic has 10 replies, 2 voices, and was last updated 6 years, 10 months ago by David Keene.
-
AuthorPosts
-
January 5, 2019 at 5:27 pm #20421David KeeneParticipant
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 MemberCommittee Members – {role-unparsed}-Committee Members
Instructors {role-unparsed}-Instructors
Your help would be appreciated.
Oh – Thanks for adding my suggestion called {role-unparsed}-****
Regards
DaveJanuary 5, 2019 at 7:36 pm #20424Shamim HasanKeymasterUsers 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?January 6, 2019 at 5:57 pm #20439David KeeneParticipantHi 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.January 7, 2019 at 3:19 am #20444Shamim HasanKeymasterYou can use
fep_get_user_groupsfilter to show any groups you want.January 7, 2019 at 3:13 pm #20486David KeeneParticipantHi Shamim
Again thanks for the quick reply, can you please explain how to use fep_get_user_groups
Regards
Dave Keene
January 7, 2019 at 7:03 pm #20497Shamim HasanKeymasteradd 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.
January 8, 2019 at 5:36 pm #20538David KeeneParticipantThanks 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
January 8, 2019 at 10:34 pm #20563Shamim HasanKeymasterIt 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';January 31, 2019 at 3:59 pm #21180David KeeneParticipantHi 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.February 1, 2019 at 5:00 am #21185Shamim HasanKeymasterGroup 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';February 1, 2019 at 5:38 pm #21196David KeeneParticipantHi Shamim
Again thanks for your help, this solved my problem.
Regards
Dave Keene
-
AuthorPosts
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.