function ffc_condition_execute_hide_on_role in Field formatter conditions 7
Hide the source field when the current user has a certain role.
File
- ./
ffc.module, line 182 - Field formatter conditions.
Code
function ffc_condition_execute_hide_on_role(&$build, $source, $configuration) {
global $user;
if (array_intersect_key($configuration['roles'], $user->roles) != array()) {
$build[$source]['#access'] = FALSE;
}
}