Getting user-IPs? Getting user-IPs?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Getting user-IPs?

Started by mrshs, November 28, 2010, 02:46:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mrshs

Hello everyone!

Is there a way to find out what an IP a user has, without him/her having posted a comment? We have serious troubles with a user at our gallery. Deleting his account doesn't help as he can register again, and again. So, what we would need is a way, to see the IP of a member right after he registered, so we can look the IP up, before we approve his registration.

Is there a WAY to find out from what IP the person did register? I looked everywhere but can't find such a feature.


Thanks in advance!

Αndré

Did you intentionally marked your topic as solved? If not, it should be possible by adding a new field to the user database and populate it during the installation.

mrshs

OMG it isn't solved.. that was a mistake.. but I am afraid I can not unmark it, eh?

However, how would I add such a field? Are there any instructions? Otherwise I am afraid I can't add the field myself.

Αndré

Quote from: mrshs on November 28, 2010, 03:02:01 PM
I can not unmark it
You can by pressing the 'X' in the initial post. I've done that for you.


Quote from: mrshs on November 28, 2010, 03:02:01 PM
However, how would I add such a field?
Use a tool like phpMyAdmin to add the new field to the users table. If you've done that we have to modify a Coppermine file (probably register.php, but I haven't checked that yet).

mrshs

Oh, ok, I am at phpMyAdmin now.. but I am totally lost. I am at the cpg_users list, but what do I need to do?


Sorry that you've have to help such a PHP-loser here.


PS: Thanks for "unsolving" this topic again!  ;)

mrshs

Hi, can anyone tell me where I can find out how to do this? I was looking at the phpMyAdmin website, but I don't know what exactly to look around for.

Αndré


mrshs

Thanks Andre! I was actually looking for "how to add a field...etc".. so, I didn't find a lot.

mrshs

Quote from: Αndré on November 28, 2010, 03:07:30 PM
Use a tool like phpMyAdmin to add the new field to the users table. If you've done that we have to modify a Coppermine file (probably register.php, but I haven't checked that yet).

Hi you!

OK, so I've added the field in the users table. What am I going to do now with the register.php?

Αndré

Open register.php, find
    $sql = "INSERT INTO {$CONFIG['TABLE_USERS']} (user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_profile1, user_profile2, user_profile3, user_profile4, user_profile5, user_profile6, user_language) VALUES (NOW(), '$active', '$act_key', '$user_name', '$encpassword', '$email', '$profile1', '$profile2', '$profile3', '$profile4', '$profile5', '$profile6', '$user_language')";
and replace with
    global $raw_ip;
    $sql = "INSERT INTO {$CONFIG['TABLE_USERS']} (user_regdate, user_active, user_actkey, user_name, user_password, user_email, user_profile1, user_profile2, user_profile3, user_profile4, user_profile5, user_profile6, user_language, ip_address) VALUES (NOW(), '$active', '$act_key', '$user_name', '$encpassword', '$email', '$profile1', '$profile2', '$profile3', '$profile4', '$profile5', '$profile6', '$user_language', '$raw_ip')";


Don't forget to adjust 'ip_address' to the name of your created column.

mrshs

Hi André!

thanks for your answer...

I did what you said, adjusted the columns name, but when I try to register a new test account, and look up the profile/account of the test-user, I see now IP address... also no field for it... :(

Αndré

Quote from: mrshs on December 09, 2010, 09:00:56 PM
look up the profile/account of the test-user
Where exactly do you want the IP being displayed? Please post a link for better clarification (even I cannot access it).