Forum
check if admin user is logged in from the front end
hi,
is it possible to check if an admin user is logged in from a page on the front end?
like perch_member_logged_in() but for admin users not members?
thanks.
hi,
is it possible to check if an admin user is logged in from a page on the front end?
like perch_member_logged_in() but for admin users not members?
thanks.
You could use minimal perch API function, but I don't see any reason this would be useful, what would you be hoping to do? Maybe there is something better...
Yes, the "Ctrl-E to edit" functionality does this. What are you trying to achieve? You have to be careful with it or you'll kill your performance.
i'd like a couple of pages on the site which are for staff only, i know could register them as members but the only people who need to access are admin users so it's not ideal to ask them to log in as a member and an admin user separately to view. the pages would be very low traffic so i'm not too concerned with performance but i'm open to suggestions if there's a better approach?
It's not public API, so I can't support it, but you can use:
thank you!