diff options
Diffstat (limited to 'engine')
-rw-r--r-- | engine/lib/sessions.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/engine/lib/sessions.php b/engine/lib/sessions.php index 3e1ae3c13..66758084b 100644 --- a/engine/lib/sessions.php +++ b/engine/lib/sessions.php @@ -25,6 +25,21 @@ return false;
}
+ + /** + * Returns whether or not the user is currently logged in and that they are an admin user. + * + * @uses $_SESSION + * @uses isloggedin() + * @return true|false + */ + function isadminloggedin() + { + if ((isloggedin()) && (($_SESSION['user']->admin || $_SESSION['user']->siteadmin))) + return true; + + return false; + } /**
* Perform standard authentication with a given username and password.
|