4
userhasrole
user_has_role
SYNOPSIS
user_has_role($role)
DESCRIPTION
CODE
- require_once 'userisidentified.php';
- function user_has_role($role) {
- return user_is_identified() and !empty($_SESSION['user']['role']) and in_array($role, $_SESSION['user']['role']);
- }
Comments