If Admin
-
How can I determine if the user is an admin or not?
I have the following code so far (based on a WordPress one I use):
<?php global $bb_current_user; bb_get_current_user_info(); if ($bb_current_user->bb_user_level == 10 ) { ?><li><a title="Admin" href="http://www.paperviewmagazine.com/forums/bb-admin/">Admin</a></li><?php } ?>
But it doesn’t quite work, I’m guessing the user level is the problem. I know I could use bb_admin_link but I want to write the url myself.
Also how can I get the url for the profile edit page for a logged in user? so for example:
/forums/profile/cameron/edit/
Thanks.
- You must be logged in to reply to this topic.