You are here

function space_og::access_space in Spaces 7.3

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

Override of access_space().

Overrides space_type::access_space

File

spaces_og/plugins/space_og.inc, line 63

Class

space_og
Organic groups integration for Spaces.

Code

function access_space($account = NULL) {
  global $user;
  $account = isset($account) ? $account : $user;
  return parent::access_space($account) && (user_access('administer group') || $this->group->{OG_ACCESS_FIELD}[LANGUAGE_NONE][0]['value'] != 1 || og_is_member($this->og->gid, 'user', $account) || user_is_anonymous());

  // User hasn't logged in -- provide entry point
}