Home › Forums › Front End PM PRO › You do not have permission to access message system
- This topic has 8 replies, 2 voices, and was last updated 6 years, 7 months ago by Shamim Hasan.
- AuthorPosts
- May 10, 2019 at 6:21 am #24376Uğur TerziParticipant
Hello,
I used <?php echo do_shortcode(“[front-end-pm]“); ?> in a template but it says “You do not have permission to access message system” even the test users role has the permission.
Do you have any idea?
Thank you.
Attachments:You must be logged in to view attached files.May 10, 2019 at 12:03 pm #24384Shamim HasanKeymasterPlease go to Front End PM PRO > Settings > Security > Who can access message system?
Let me know.
May 10, 2019 at 7:15 pm #24395Uğur TerziParticipantI already mentioned at the first update “..even the test users role has the permission.”
Note: I tried to check all roles before creating this support topic.May 10, 2019 at 7:35 pm #24398Shamim HasanKeymasterSorry for that. Sometimes user think other plugin permission, so as a measure i told you to check that.
Any role user can access that or all users getting that error?
Do you use any custom code for this plugin?
This error means any plugin/code is using hookfep_current_user_canto dynamically change access permission. Can you deactivate all other plugins and change theme to one of default theme then test? Then activate one by one. if you found any conflict let me know so that i can try to solve the issue.May 10, 2019 at 10:05 pm #24410Uğur TerziParticipantHi Shamim,
Regarding the “Any role user can access that or all users getting that error?” I already told you 🙂 that “I tried to check all roles before creating this support topic.”
No, I just installed and activated. No custom code. The shortcode “[front-end-pm]” prints that permission error for all kind of roles evet it has the permission or not.
I searched the hook “fep_current_user_can” in the whole file system and the result is no other location than “front-end-pm-pro”.
Thanks
May 10, 2019 at 11:43 pm #24414Shamim HasanKeymasterAre you using any caching plugin? If yes please clear cache and exclude message page from caching. Also deactivate caching plugin temporarily.
If still not working then it needs some debug from php. If you are comfortable to change php then i can live chat with you and give you debug code. Otherwise you can give me access permission to your website so that i can debug in your website.
Let me know.
May 10, 2019 at 11:49 pm #24416Uğur TerziParticipantNo, I don’t use any cache plugin yet. But I’ll (WP Fastest Cache Pro)
Regarding the debugging, yes I can help you. What do you need me to add and how can we chat?May 10, 2019 at 11:54 pm #24419Shamim HasanKeymasterhttps://sp-test1.arogga.co/live-chat/
This chat link will be available for next 30 minutesMay 11, 2019 at 2:09 am #24422Shamim HasanKeymasterIn your child theme’s functions.php you had
$user_role = array_shift($current_user->roles);. Please read https://www.php.net/manual/en/function.array-shift.phparray _shift will remove first element from array. So it remove your role.
This does not only affect this plugin but other functions as well. Your website is a membership website. Your member will not be able to access content as their roles is removed.I have corrected that. I hope this will solve your issue.
Let me know.
- AuthorPosts
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.