1
Sykoman
Send IP address to admin when user registers
  • 2005/1/8 19:30

  • Sykoman

  • Just popping in

  • Posts: 5

  • Since: 2005/1/8 1


Hello all,

I've recently set XOOPS up on my web-site, and have it configured so that when a user registers an email is set to me(the admin) so I can activate their account. Because my web-site is for locals only I want to be able to track their IP address. Unfortunately I can't seem to figure out how to add this to the activation email. Any suggestions?
I'm pretty confident I could hack it so that I get the IP address, but I'd rather see if there is already a way to do so, before attempting this rather difficult(for me)hack.

Thanks in advance!

2
Sykoman
Re: Send IP address to admin when user registers
  • 2005/1/9 17:54

  • Sykoman

  • Just popping in

  • Posts: 5

  • Since: 2005/1/8 1


Please? Anybody?

3
Peekay
Re: Send IP address to admin when user registers
  • 2005/1/9 20:04

  • Peekay

  • XOOPS is my life!

  • Posts: 2335

  • Since: 2004/11/20


The IP addresses of most users would probably change anyway at some point after registering, unless they had purchased static IP address from their ISP.

4
Sykoman
Re: Send IP address to admin when user registers
  • 2005/1/9 20:20

  • Sykoman

  • Just popping in

  • Posts: 5

  • Since: 2005/1/8 1


Umm, yeah I kinda noticed. I don't mean to be rude, but if your not gonna help, then why post?

I don't care that the address may change, I want to know the address they use to register. Thats all I want. Looks like I'm just gonna have to go and hack it.

5
Sykoman
Re: Send IP address to admin when user registers
  • 2005/1/11 15:17

  • Sykoman

  • Just popping in

  • Posts: 5

  • Since: 2005/1/8 1


Hi,
Never mind. I figured it out.
Got to your register.php in the root directory of XOOPS and find the code :
Quote:

$xoopsMailer->useMail();
$xoopsMailer->setTemplate('adminactivate.tpl');
$xoopsMailer->assign('USERNAME', $myts->oopsStripSlashesGPC($uname));

Under where it says:
Quote:

$xoopsMailer->assign('USERNAME',$myts->oopsStripSlashesGPC($uname));

Add :
Quote:

$xoopsMailer->assign('USERIP',$_SERVER['REMOTE_ADDR']);


And then open your adminactivate.tpl(usually at /xoops_root/language/your_language/mail_template/)
And add :
Quote:

USERNAME's IP address is ({USERIP}).

to your activation message.
There, it works, it tracks the IP address and then send it to you. I dunno if this poses a security risk or not, I don't see how it would though.

Login

Who's Online

210 user(s) are online (129 user(s) are browsing Support Forums)


Members: 0


Guests: 210


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Jun 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits