• Resolved sdonnet

    (@sdonnet)


    Hi,

    We have a huge problem with the plugin, when diplaying the message page :
    – on a page, we need to display the inbox, with the shortcode [front-end-pm],
    – it does not work well logged users. We have a “You do not have permission to access message system”
    – by debbuging the program, we have seen that it calls “fep_current_user_can(access_message)”, and when it failed, the user call you made on function.php, line 827 :
    $roles = wp_get_current_user()->roles;
    returns an empty array. So, user having no roles, can not access message.
    You perform a lot of calls to “fep_current_user_can(access_message)”, and only the one called by “main_shortcode_output” returns 0 roles, the other calls returning correct values.

    For precision, we are on a WordPress on windows.
    Same installation on Linux works well.

    Any idea ?

    Best Regards

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

    (@shamim51)

    Do your users have role? if your users have no roles than you can use fep_no_role_access filter to give your users access.

    If your users have role than please check Dashboard > Front End PM > Settings > Security

    Thread Starter sdonnet

    (@sdonnet)

    Yes, user has 1 role. We have traced fep_current_user_can, with access_message parameter. It is called about 12 times per page. On the last call, when called by “main_shortcut_output”, wp_get_current_user()->roles returns an empty array. But, on all the previous calls, wp_get_current_user()->roles return an array with correct role.

    Thread Starter sdonnet

    (@sdonnet)

    I forgot to say : all roles have been checked in “Dashboard > Front End PM > Settings > Security > Who can access message system?”

    Plugin Author Shamim Hasan

    (@shamim51)

    This is weired. Why last call will return empty? Can you please trace any plugin/theme conflict?

    Thread Starter sdonnet

    (@sdonnet)

    Hi,

    Sorry for the delay of my reply, but my customer has postponed the use of the plugin.

    Thanks for your advices. See you probably in a few months…

    Best Regards

    Sylvain

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Shortcode does not display, due to role empty’ is closed to new replies.