check from custom front php page if its executed by cms admin or cms admin is logged in
3 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: January 4, 2022 (RSS)
By ht1080z - November 28, 2021
Hi,
I'm creating a simple custom plugin by putting a custom "print" link in the section records row to preview and/or print the custom page with all the fields of each record.
In this custom frontend php page I want to put a security check to see if the page is opened by the cms admin.
I'm using separated cms user table and members tables with the membership plugin.
Any help would be appreciated,
Karls
By daniel - January 4, 2022
Hi Karls,
Admin users have a flag set when they log in which can be checked like this:
global $CURRENT_USER;
if (!empty($CURRENT_USER['isAdmin'])) {
// execute admin-only code here
}
Let me know if that works for you, or if you have any other questions!
Thanks,
Technical Lead
interactivetools.com