IP in Admin Activation Email

A perfect place for code snippets to small to be a MOD or a library.
Or for examples on how to use our libraries.
Post Reply
Elglobo
Past Contributor
Past Contributor
Posts: 119
Joined: 15 Jul 2008, 19:42

IP in Admin Activation Email

Post by Elglobo »

This post was originally posted by Kenny at 6 String MODs.

This snippet adds registration IP Address to the admin activation email.

* Please note that if you do not use admin activation on your forums, then this snippet is useless to you *

OPEN: includes/ucp/ucp_register.php
FIND:

Code: Select all

                            $messenger->assign_vars(array(
                                'USERNAME'        => htmlspecialchars_decode($data['username']),
                                'U_USER_DETAILS'    => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id",
                                'U_ACTIVATE'        => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey")
                            );   &nbsp

REPLACE WITH:

Code: Select all

                            $messenger->assign_vars(array(
                                'USERNAME'        => htmlspecialchars_decode($data['username']),
                                'USER_IP'        => $user->ip,
                                'U_USER_DETAILS'    => "$server_url/memberlist.$phpEx?mode=viewprofile&u=$user_id",
                                'U_ACTIVATE'        => "$server_url/ucp.$phpEx?mode=activate&u=$user_id&k=$user_actkey")
                            );   &nbsp

OPEN: language/en/email/admin_activate.txt
FIND:

Code: Select all

Use this link to view the user's profile:

BEFORE ADD:

Code: Select all

Registered IP Address: {USER_IP}
phpBB-Services.com: L'hébergement et l'assistance de votre forum phpBB en toute tranquillité.

Myff.fr - My First forum, créer votre forum phpBB3 facilement !
moundtown
New member
New member
Posts: 1
Joined: 20 Jun 2017, 00:26

Re: IP in Admin Activation Email

Post by moundtown »

This does not work with version 3.1. Is there and update to this snippet?
Post Reply