PDA

View Full Version : IP Restrict User


Zazz
06-25-2002, 10:00 PM
Using this hack makes it impossible for users to login with an ip other than the one that was put in database upon registering.

Not much of a hack really, only 5 line's of code and a error template, but it could be usefull to prevent account sharing and such :)

If there's no ip in the ipaddress field in the user table of your database for a user, it will allow the user to login, so modem users and other people with a dynamic ip can log-in, as long as you delete their registered ip from their profile.

Xenon
06-26-2002, 01:24 PM
hmm, i don't know, but not much people have a static ip....
i think this will cause more problems as it'll avoid.

Neo
06-26-2002, 03:00 PM
Isnt this already a function in vbulletin?

John
06-26-2002, 04:38 PM
I've never seen it :S

Boofo
06-26-2002, 05:54 PM
There's already a hack out like this called checkip. :)

Marshalus
06-27-2002, 01:10 AM
I suppose this would be OK if I could restirct it by the IP block, but not the exact IP. Unless I can do that I'm not installing this, too many problems.

Zazz
06-27-2002, 04:40 AM
Aargh, newreply.php must hate me :p
I didn't know there was already such a hack out there, I couldn't find it here anyway.
About the range locking, I'm working on that, but I need to find the ipban function so I can see how it works :)

Zazz
06-27-2002, 09:51 AM
Did it, if you want range support open root/member.php and
replace

if (($user[ipaddress]!="") && ($ipaddress!=$user[ipaddress])) {

with

$iplocker=strstr(" ".$ipaddress," ".$user[ipaddress]);
if (($user[ipaddress]!="") && ($iplocker!=" ".$ipaddress)) {

Boofo
07-15-2002, 12:08 AM
Could this be made to be able to turn on or off in the admin cp?

Originally posted by Zazz
Did it, if you want range support open root/member.php and
replace

if (($user[ipaddress]!="") && ($ipaddress!=$user[ipaddress])) {

with

$iplocker=strstr(" ".$ipaddress," ".$user[ipaddress]);
if (($user[ipaddress]!="") && ($iplocker!=" ".$ipaddress)) {

adriandaz
11-03-2002, 04:08 AM
hehe :) - dont install if your members are on dialup net access :D - good effort though :D

Erwin
11-03-2002, 04:21 AM
If a member belongs to AOL, then they are in trouble because they will have a different IP each time they log on. :)