You are here

function simple_access_action_profile_enable in Simple Access 5.2

Action enable access profile

File

inc/workflow_ng.inc, line 289
Add workflow ng functionality to simple access

Code

function simple_access_action_profile_enable($conf, $data) {
  $node = $data['data']['node'];
  foreach (array_filter($conf['sa_profiles']) as $pid) {
    if (!in_array($pid, $node->simple_access_profiles)) {
      $node->simple_access_profiles[] = $pid;
    }
  }
  return array(
    'node' => $node,
  );
}