Topic: IP to user assignment
Just a quickie. Which script sees to updating the user/IP pair?
Cheers,
Matt
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.2 discussion → IP to user assignment
Just a quickie. Which script sees to updating the user/IP pair?
Cheers,
Matt
what pair?
The online ident bit. Wanting to try and adapt it so that the IP of the logged in user is updated as and when the IP changes and the previous IP is removed. I may be wrong in how I think it works at the moment, but it would appear the IP to username info is updated, but the old IP is left in state until the online timeout expires?
ident is a username for users, it's an IP for guests
When you login, your guest online entry is deleted and on your first pageview, your new user online entry is created
So when you login, the ident becomes the username, and your IP address is stored as what/where? Once you've logged in, if your IP address is changing every page or two, that old IP then becomes seen as a guest connection, and your recent/actual IP is listed/correlated with you. Is that correct?
Cheers,
Matt
So when you login, the ident becomes the username, and your IP address is stored as what/where? Once you've logged in, if your IP address is changing every page or two, that old IP then becomes seen as a guest connection, and your recent/actual IP is listed/correlated with you. Is that correct?
Cheers,
Matt
No, that's not correct. IP based tracking stops once you have a cookie. The order of events goes something like this
- Does the user have a valid cookie
- Yes
- Does the user have an entry in the online table already?
- Yes
- Update the entry with the current time
- No
- Add a new entry for the user id/username
- No
- Does the IP have an entry in the online table already?
- Yes
- Update the entry with the current time
- No
- Add a new entry for the user id/IP
Right. I've obviously picked the totally wrong conclusion then. My apologies. That does lead onto another question, though. I have one user that I've noted, specifically using the AOL system, that when they shift pages, from a page requiring being logged in, to any other another page, their IP changes, yet the previous IP, (attributed correctly as guest in the username bit), is still appearing to be viewing pages requiring login. I know that technically they are logged in, and it's only the fact that the username has been correlated to a different IP, but is there any way to remove that previous IP from the table when the new IP is assigned to their username? It is merely to stop the 'appearance' that a guest is logged in and accessing pages they obviously can't.
p.s: I really hope the above makes sense.
Thanks again,
Matt
Oh, so when they go to login they have one IP but when they submit the form they have a different IP?
There really isn't a good way to deal with that (because there's no way to track what IP someone previously had when the method you're tracking them with requires an IP. You just have to wait for the timeout.
Yup. That's pretty much what's happening. Like an octopus on acid. You never know which tentacle is gonna appear. It can be any one of about four IP's that the next connection will come from as a rule, so they're all over the place.
Cheers for the advice.
Matt
PunBB Forums → PunBB 1.2 discussion → IP to user assignment
Powered by PunBB, supported by Informer Technologies, Inc.