function workbench_email_get_workbench_access_editors in Workbench Email 7.3
Get all the editors of workbench access section.
Parameters
int $rid: The role id.
array $sections: The sections selected by the user.
Return value
array The available editors.
2 calls to workbench_email_get_workbench_access_editors()
- workbench_email_get_all_transition_users in ./
workbench_email.module - Returns all available users for an email transition.
- workbench_email_notification_validate in ./
workbench_email.form.inc - Validates the options chosen.
File
- ./
workbench_email.module, line 1115 - Code for the Workbench Email Module.
Code
function workbench_email_get_workbench_access_editors($rid, $sections) {
$active_scheme = variable_get('workbench_access');
if ($active_scheme == 'taxonomy') {
$sections = workbench_email_scheme_taxonomy_get_parents($sections);
}
elseif ($active_scheme == 'menu') {
$sections = workbench_email_scheme_menu_get_parents($sections);
}
$role = workbench_email_get_role_by_rid($rid);
// Get all the editors of workbench access section.
$editors = workbench_email_get_editors($role, $sections);
return $editors;
}