Permalink
Browse files

Added isPrivileged method to easily display certain content to privil…

…eged users.
  • Loading branch information...
1 parent eb79c60 commit 1c0ba30a11806f92916ce26bd735585fa8826a26 @igal igal committed Feb 18, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 OSBridge.php
View
@@ -442,6 +442,14 @@ function customBox( $bar, $cont ) {
<?php
}
+ /*************************************************************************************************/
+ # Does this user have special privileges? True if they're a sysop or bureaucrat.
+ function isPrivileged() {
+ $user = $this->skin->mUser;
+ if (! $user) return(false);
+ $groups = $user->getGroups();
+ return(in_array('sysop', $groups) || in_array('bureaucrat', $groups));
+ }
} // end of class

0 comments on commit 1c0ba30

Please sign in to comment.