You are here

function space_og::access_user in Spaces 6.3

Same name and namespace in other branches
  1. 7.3 spaces_og/plugins/space_og.inc \space_og::access_user()
  2. 7 spaces_og/plugins/space_og.inc \space_og::access_user()

Override of access_user().

Overrides space_type::access_user

File

spaces_og/plugins/space_og.inc, line 99

Class

space_og
Organic groups integration for Spaces.

Code

function access_user($op = 'view', $account = NULL) {
  global $user;
  $account = isset($account) ? $account : $user;

  // Test whether both user and account belong to current space.
  $test_user = og_is_group_member($this->id);
  $test_account = og_is_group_member($this->id, FALSE, $account->uid);
  if ($test_user && $test_account || user_access('view users outside groups')) {
    return parent::access_user($op, $account);
  }
  return FALSE;
}