Line 193 | Line 193 |
---|
if ($group_row[$group_id]['group_type'] == GROUP_FREE) { group_user_add($group_id, $user->data['user_id']);
|
if ($group_row[$group_id]['group_type'] == GROUP_FREE) { group_user_add($group_id, $user->data['user_id']);
|
$email_template = 'group_added';
| |
} else { group_user_add($group_id, $user->data['user_id'], false, false, false, 0, 1);
|
} else { group_user_add($group_id, $user->data['user_id'], false, false, false, 0, 1);
|
$email_template = 'group_request'; }
| |
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); $messenger = new messenger();
$sql = 'SELECT u.username, u.username_clean, u.user_email, u.user_notify_type, u.user_jabber, u.user_lang
|
include_once($phpbb_root_path . 'includes/functions_messenger.' . $phpEx); $messenger = new messenger();
$sql = 'SELECT u.username, u.username_clean, u.user_email, u.user_notify_type, u.user_jabber, u.user_lang
|
FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . ' u
| FROM ' . USER_GROUP_TABLE . ' ug, ' . USERS_TABLE . " u
|
WHERE ug.user_id = u.user_id
|
WHERE ug.user_id = u.user_id
|
AND ' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? "ug.user_id = {$user->data['user_id']}" : 'ug.group_leader = 1') . "
| AND ug.group_leader = 1
|
AND ug.group_id = $group_id"; $result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
|
AND ug.group_id = $group_id"; $result = $db->sql_query($sql);
while ($row = $db->sql_fetchrow($result)) {
|
$messenger->template($email_template, $row['user_lang']);
| $messenger->template('group_request', $row['user_lang']);
|
$messenger->to($row['user_email'], $row['username']); $messenger->im($row['user_jabber'], $row['username']);
| $messenger->to($row['user_email'], $row['username']); $messenger->im($row['user_jabber'], $row['username']);
|
Line 234 | Line 229 |
---|
$db->sql_freeresult($result);
$messenger->save_queue();
|
$db->sql_freeresult($result);
$messenger->save_queue();
|
| }
|
add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_JOIN' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? '' : '_PENDING'), $group_row[$group_id]['group_name']);
| add_log('user', $user->data['user_id'], 'LOG_USER_GROUP_JOIN' . (($group_row[$group_id]['group_type'] == GROUP_FREE) ? '' : '_PENDING'), $group_row[$group_id]['group_name']);
|
Line 597 | Line 593 |
---|
if (!check_form_key('ucp_groups')) { $error[] = $user->lang['FORM_INVALID'];
|
if (!check_form_key('ucp_groups')) { $error[] = $user->lang['FORM_INVALID'];
|
| }
// Validate submitted colour value if ($colour_error = validate_data($submit_ary, array('colour' => array('hex_colour', true)))) { // Replace "error" string with its real, localised form $error = array_merge($error, $colour_error);
|
}
if (!sizeof($error))
| }
if (!sizeof($error))
|
Line 639 | Line 642 |
---|
if (sizeof($error)) {
|
if (sizeof($error)) {
|
| $error = array_map(array(&$user, 'lang'), $error);
|
$group_rank = $submit_ary['rank'];
$group_desc_data = array(
| $group_rank = $submit_ary['rank'];
$group_desc_data = array(
|