Topic: Adding IP To Welcome email template (and so admin sees it)
I'm just wondering about adding the IP
would I add a line
$mail_message = str_replace('<user_ip>',get_remote_address(), $mail_message);
or $mail_message = str_replace('<user_ip>','registration_ip', $mail_message);
or $mail_message = str_replace('<user_ip>',$registration_ip, $mail_message);
in include/functions.php
($hook = get_hook('fn_add_user_qr_insert_user')) ? eval($hook) : null;
$forum_db->query_build($query) or error(__FILE__, __LINE__);
$new_uid = $forum_db->insert_id();
// Must the user verify the registration?
if ($user_info['require_verification'])
{
// Load the "welcome" template
$mail_tpl = forum_trim(file_get_contents(FORUM_ROOT.'lang/'.$forum_user['language'].'/mail_templates/welcome.tpl'));
// The first row contains the subject
$first_crlf = strpos($mail_tpl, "\n");
$mail_subject = forum_trim(substr($mail_tpl, 8, $first_crlf-8));
$mail_message = forum_trim(substr($mail_tpl, $first_crlf));
$mail_subject = str_replace('<board_title>', $forum_config['o_board_title'], $mail_subject);
$mail_message = str_replace('<base_url>', $base_url.'/', $mail_message);
$mail_message = str_replace('<username>', $user_info['username'], $mail_message);
$mail_message = str_replace('<activation_url>', str_replace('&', '&', forum_link($forum_url['change_password_key'], array($new_uid, substr($user_info['activate_key'], 1, -1)))), $mail_message);
$mail_message = str_replace('<board_mailer>', sprintf($lang_common['Forum mailer'], $forum_config['o_board_title']), $mail_message);
($hook = get_hook('fn_add_user_send_verification')) ? eval($hook) : null;