You are here

function oa_user_access in Open Atrium Core 7.2

Replacement for og_user_access.

Because we don't use the alter hook, we don't need to do the full entity load so often checking via direct query (if node is unlikely to have been loaded) is faster.

See also

og_user_access

1 call to oa_user_access()
oa_corePermissionWeb::test_oa_sectionsAccess in tests/oa_corePermissionWeb.test

File

includes/oa_core.util.inc, line 1781
Code for Utility functions for OpenAtrium spaces

Code

function oa_user_access($group_type, $gid, $string, $account = NULL, $skip_alter = FALSE, $ignore_admin = FALSE) {
  $access = oa_user_access_nids($group_type, array(
    $gid,
  ), $string, $account, $skip_alter, $ignore_admin);
  return reset($access);
}