Home › Forums › Front End PM PRO › Allow Only Certain Users to Send to Groups › Reply To: Allow Only Certain Users to Send to Groups
July 23, 2018 at 12:57 am
#15856
Shamim Hasan
Keymaster
Yes.
Add following code in your theme’s (child theme’s if any) functions.php
add_filter( 'fep_get_option', function( $value, $option ){
if( 'can-send-to-group' == $option ){
if( in_array( 'supervisors', wp_get_current_user()->roles ) ){
$value = true;
} else {
$value = false;
}
}
return $value;
}, 10, 2 );
Change supervisors
with your supervisors user’s role.