How to setup the relationship between K2 user groups and extra field groups?
In the item.php, lines 15 to 19, you will find this array:
$efACL = array(
"3" => array("1", "2", "3"),
// Administrator
"4" => array("1","2"),
// Manager
"5" => array("1")
// User
);
As you can see, the keys of this array are K2 user groups ID 3, 4 and 5
And the value of each element is an array of extra field groups that can be seen by the users belonging
to the K2 user group.
For example “3”=> array(“1”, “2”, “3”) means that the users belonging to the K2 user group with ID =
3, which is the administrator group, can see the extra fields belonging to extra field groups with ID =1,
2, 3
Then, I added this condition && in_array($extraField->group, $canSee) in the IF statement which
checks for the extra field value before displaying it.