function space_og::access_user in Spaces 7.3
Same name and namespace in other branches
- 6.3 spaces_og/plugins/space_og.inc \space_og::access_user()
- 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 119
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_member($this->og->gid, 'user');
$test_account = og_is_member($this->og->gid, FALSE, $account->uid);
if ($test_user && $test_account || user_access('view users outside groups')) {
return parent::access_user($op, $account);
}
return FALSE;
}