function group_user_can_request_membership in Group 7
Check whether a user can request to join a group.
Parameters
Group $group: The group to check access for.
object $account: The user to check access for.
GroupMembership|false $group_membership: The group membership if one exists already.
Return value
bool Whether the user can request a membership for the group.
1 string reference to 'group_user_can_request_membership'
- group_group_membership_action_info in ./
group.group.inc - Implements hook_group_membership_action_info().
File
- ./
group.group.inc, line 449 - Hook implementations for the Group module.
Code
function group_user_can_request_membership(Group $group, $account, $group_membership) {
return empty($group_membership) && group_access('request membership', $group, $account);
}