Advanced search  

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

Pages: [1]   Go Down

Author Topic: Getting user-IPs?  (Read 3928 times)

0 Members and 1 Guest are viewing this topic.

mrshs

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Getting user-IPs?
« on: November 28, 2010, 02:46:11 pm »

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!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Getting user-IPs?
« Reply #1 on: November 28, 2010, 02:59:30 pm »

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.
Logged

mrshs

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Getting user-IPs?
« Reply #2 on: November 28, 2010, 03:02:01 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Getting user-IPs?
« Reply #3 on: November 28, 2010, 03:07:30 pm »

I can not unmark it
You can by pressing the 'X' in the initial post. I've done that for you.


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).
Logged

mrshs

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Getting user-IPs?
« Reply #4 on: November 28, 2010, 03:17:23 pm »

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!  ;)
Logged

mrshs

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Getting user-IPs?
« Reply #5 on: December 08, 2010, 03:57:12 pm »

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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Getting user-IPs?
« Reply #6 on: December 08, 2010, 04:11:29 pm »

Logged

mrshs

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Getting user-IPs?
« Reply #7 on: December 08, 2010, 04:14:06 pm »

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

mrshs

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Getting user-IPs?
« Reply #8 on: December 08, 2010, 04:41:37 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?
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Getting user-IPs?
« Reply #9 on: December 09, 2010, 02:27:55 pm »

Open register.php, find
Code: [Select]
    $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
Code: [Select]
    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.
Logged

mrshs

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: Getting user-IPs?
« Reply #10 on: December 09, 2010, 09:00:56 pm »

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... :(
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Getting user-IPs?
« Reply #11 on: December 10, 2010, 11:55:46 am »

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).
Logged
Pages: [1]   Go Up
 

Page created in 0.03 seconds with 19 queries.