function space_type::access_admin in Spaces 6.3
Same name and namespace in other branches
- 7.3 plugins/space_type.inc \space_type::access_admin()
- 7 plugins/space_type.inc \space_type::access_admin()
Grant a user administrative access to this space.
Parameters
$account: Optional: user account object to check against. If omitted, the global $user object (current user) will be used.
Return value
TRUE if access should be granted. FALSE if not.
2 calls to space_type::access_admin()
- space_og::access_admin in spaces_og/
plugins/ space_og.inc - Override access_admin().
- space_user::access_admin in spaces_user/
plugins/ space_user.inc - Override of access_admin().
2 methods override space_type::access_admin()
- space_og::access_admin in spaces_og/
plugins/ space_og.inc - Override access_admin().
- space_user::access_admin in spaces_user/
plugins/ space_user.inc - Override of access_admin().
File
- plugins/
space_type.inc, line 79
Class
- space_type
- Common functionality for space types that implement access, routing, delegated Views filtering and feature management concepts. Examples: spaces_og, spaces_user, spaces_taxonomy.
Code
function access_admin($account = NULL) {
global $user;
$account = isset($account) ? $account : $user;
return user_access('administer site configuration', $account) || user_access('administer spaces', $account);
}