[phplib] Numeric check on permissions From: James Johnson (james <email protected>)
Date: 05/11/01

Dear phplibbers,

I have a variable, let's called it $perm_required, which
is a number representing the permissions required
to do something. i.e. in the default php setup 1
represents 'user', 16 represents 'admin', so 17 would
mean user or admin. I want to do a test to see if the
current user has the permissions represented by
$perm_required.

i.e.

if ( user has perm represented in $perm_required )
         do_something ();

What is the most elegant way to do this?

Cheers,

James

James Johnson
Managing Director
Publitek New Media Ltd.

IMPORTANT NOTE: NEW ADDRESS

18 Brock Street, Bath, BA1 2LW, UK
T: +44 (0) 1225 780174
F: +44 (0) 1225 470047
Courier deliveries should be addressed to 'West Door'
Please amend your records and let your colleagues know

---------------------------------------------------------------------
To unsubscribe, e-mail: phplib-unsubscribe <email protected>
For additional commands, e-mail: phplib-help <email protected>