function group_user_can_join in Group 7
Check whether a user can 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 join the group.
1 string reference to 'group_user_can_join'
- group_group_membership_action_info in ./
group.group.inc - Implements hook_group_membership_action_info().
File
- ./
group.group.inc, line 390 - Hook implementations for the Group module.
Code
function group_user_can_join(Group $group, $account, $group_membership) {
return empty($group_membership) && group_access('join group', $group, $account);
}