Function call when logged into admin?

Permalink
Does any1 know if there is a existing function you call to know whether you have logged into the admin area? Similar to the isEditMode function?

cheers,
Ritch

 
joycebeck replied on at Permalink Reply
I had a similar request a few weeks ago:

http://www.concrete5.org/community/forums/customizing_c5/discrimina...

It works great.

<?php  
$u = new User(); //gets current user object
if($u->isLoggedIn()) { // if a user is logged in, disable Mootools ?>
<!-- <script type="text/javascript" src="mootools.js"></script> -->
<?php } else { ?>
<script type="text/javascript" src="mootools.js"></script>
<?php } ?>