10
validaterole
validate_role
SYNOPSIS
validate_role($role)
DESCRIPTION
validate_role returns true if $role is one of the supported user roles.
The supported user roles are defined in the global variable $supported_roles in config.inc.
CODE
- function validate_role($role) {
- global $supported_roles;
- return in_array($role, $supported_roles);
- }
Comments