Allow Only Certain Users to Send to Groups


Home Forums Front End PM PRO Allow Only Certain Users to Send to Groups

This topic is: Not Resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15832
    Rob Storms
    Participant

    Is it possible to allow only certain user roles to send to groups? We would like to allow supervisors to send to groups of employees, but not allow the employees within those groups to send to the group.
    Thanks!

    #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.

Viewing 2 posts - 1 through 2 (of 2 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.