Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is there something like is_admin() / is_loged_in()
#8
I think 3.1 has sitewide cookies by default, so you should be able to just read the cookie, or use globals.

Code:
GLOBAL $USR;

if (isset($USR) && $USR == get_cookie('GS_ADMIN_USERNAME')) {
  // do stuff
}

Might not be entirely accurate, I only briefly looked into it, I want a working edit this page plugin.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply


Messages In This Thread
Is there something like is_admin() / is_loged_in() - by shawn_a - 2012-03-08, 00:44:01



Users browsing this thread: 1 Guest(s)