• Resolved mikedistras

    (@mikedistras)


    In the Security tab, does it actually hide/show the Front End PM form based on a users role?
    OR is it actually a users capability?

    I have 4 extra custom User Roles, with custom capabilities each – However, even though the Security tab is ticked for the Custom Roles, the Front End PM form does NOT show up the my custom user roles when theyre logged in.

    Why is this? Or is there a specific capability i need to enable for them?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Shamim Hasan

    (@shamim51)

    Which form not showing? Which shortcode you were using?

    Thread Starter mikedistras

    (@mikedistras)

    Im using the shortcode: [front-end-pm]

    Settings page: https://image.ibb.co/cQGGnF/front_end_pm_settings.png

    Shortcode output: https://image.ibb.co/fEF97F/no_nwe_message.png

    As you can see, there is no option to create a New Message, even though “s2member level 4” is selected to be able to send new messages.

    Plugin Author Shamim Hasan

    (@shamim51)

    Please make sure your logged in user role is “s2Member Level 4”.

    I have tested in my test installation with latest version of WordPress, Front End PM and s2member and it is working fine.

    Let me know.

    Thread Starter mikedistras

    (@mikedistras)

    I had altered the Capability permissions for each Role in s2member.

    So my original question is, does front end PM look at the users “role”, or does it check if that role has a specific “capability” option?

    I can confirm i am logged in as the correct user, but still having the mentioned issue

    Plugin Author Shamim Hasan

    (@shamim51)

    Front end PM look at the users “role”.

    Are you using latest version of both plugins? Do you have any custom code for Front End PM in your website?
    Do you have PHP knowledge so that i can give you some code for debugging?

    Thread Starter mikedistras

    (@mikedistras)

    Yes using latest version of both plugins.

    The only extra things, are thats it on a WordPress MultiSite install, and its being fired from a template file: echo do_shortcode('[front-end-pm]');

    Yes, feel free to send debugging code.

    Plugin Author Shamim Hasan

    (@shamim51)

    Please add following code in your theme’s (child theme’s if any) functions.php
    It will show white screen in front end with only some info. So do not worry. When you get info you can remove this code.

    
    add_action( 'template_redirect', function (){
    	var_dump( wp_get_current_user()->roles );
    	var_dump( fep_get_option('userrole_new_message', array() ) );
    	var_dump( fep_current_user_can( 'send_new_message' ) );
    	die;
    });
    

    Please log in as user who can not see “New Message” menu button. Then paste that code and refresh front end page. Let me know what you get.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Permissions’ is closed to new replies.