Role to Role block is working for Group


Home Forums Front End PM PRO Role to Role block is working for Group

This topic is: Resolved
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #13775
    VITTHAL AMBIKE
    Participant

    When added 3 kind of user role say A B C , i already block to sent message From A To B,

    But when in group all 3 user role user are exists , then message sent from A also reaches to B , instead of reaching C,
    because there is role to role block From A to B.

    Please resolve

    #13787
    shamim
    Keymaster

    Role to role block is applicable only when sending direct message. Eg. if you block A to B role then A will not be able to send direct message to B.
    It is not applicable when sending group or admin message.

    #13793
    VITTHAL AMBIKE
    Participant

    It means, My purchase will have no value.

    Please give solution at least which will work around. Understand My Scenarios first. here is—

    Employer Group need to send Message to Candidates Groups and vice versa ,
    it should be separate by another Employer and another candidates.

    Please tell solution for bulk user message without adding same other user role.

    #13796
    shamim
    Keymaster

    So you want your Employer and Candidates can message to any group without joining that group, right?

    #13811
    VITTHAL AMBIKE
    Participant

    yes

    #13829
    shamim
    Keymaster

    Currently there is no hook for this. Next version i will try to add some hook so that this can be achieved.

    #13865
    shamim
    Keymaster

    Please go to class-fep-group-message.php line 320 and change return $user_groups; to return apply_filters( 'fep_get_user_groups', $user_groups, $user_id ); (this hook will be added to next version, so you will not be needed this change for next version)

    Then add following code in your theme’s (child theme’s if any) functions.php

    add_filter( 'fep_get_user_groups', function( $user_groups, $user_id ){
        $groups = fep_get_option('gm_groups', array());
        if( $groups && is_array( $groups) ){
            foreach ( $groups as $group ) {
                $user_groups[ $group['slug'] ] = $group['name'];
            }
        }
        return $user_groups;
    }, 10, 2);
    

    This will allow you to send message to any group without joining that group.

    #13881
    VITTHAL AMBIKE
    Participant

    will it work now?,

    because i changing line 320 , site geting blank ,

    then i tried to put code first in function.php it also giving me error on site,

    what to do?

    #13893
    shamim
    Keymaster

    did you replace code exactly what i gave you? Please recheck.
    If still not working please give me screenshot of what you have changed.
    Also let me know your PHP version.

    #13897
    VITTHAL AMBIKE
    Participant

    ok, it worked fine now.
    Thanks for.

    #14026
    David Hudgins
    Participant

    Well done! Thank you for this fix. I have made these additions and can confirm this works.

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.