function group_user_join in Group 7
Join a group.
Parameters
Group $group: The group to join.
object $account: The user that wants to join.
1 string reference to 'group_user_join'
- group_group_membership_action_info in ./
group.group.inc - Implements hook_group_membership_action_info().
File
- ./
group.group.inc, line 402 - Hook implementations for the Group module.
Code
function group_user_join(Group $group, $account) {
$group
->addMember($account->uid, array(
'joined_on' => REQUEST_TIME,
));
drupal_set_message(t('You have joined the group.'));
}