Umil.permission exists
From phpBB Development Wiki
umil::permission_exists –– Check if a permission setting exists using the Umil Library.
Contents |
Description
string umil::permission_exists ( string $auth_option [, boolean $global ] )
Parameters
| Parameter | Required/Default | Usage |
|---|---|---|
| auth_option | Required | The name of the permission setting to check for |
| global | default true | True to check for a global option, false to check for a local option |
Return Values
True if the permission setting exists
False if the permission setting does not exist
Examples
Example #1
Check if a global permission setting named 'a_test_mod' exists
$umil->permission_exists('a_test_mod');
Example #2
Check if a local permission setting named 'f_test_mod' exists
$umil->permission_exists('f_test_mod', false);
See Also

