How do I check if the current user has a permission?
posted by Stephan Borg on 01 Jul 2005 (12:39 UTC)

if ($gBitUser->hasPermission('bit_p_admin_cms')) {
This user has permission!

NOTE: if you want to exit and display an error message if they don't have permission, then:

->verifyPermission'bit_p_view' );

This displays a standard "You do not have permission!" error message.

Permalink (referenced by: 0 posts references: 0 posts)