Skip to Content Skip to Menu

[SOLVED] Retrieve user IP for cb field?

  • socialfan
  • socialfan
  • OFFLINE
  • Posts: 262
  • Thanks: 9
  • Karma: -1
13 years 6 months ago - 13 years 4 months ago #161248 by socialfan
[SOLVED] Retrieve user IP for cb field? was created by socialfan
Is it possible to retrieve the user ip from the cb registration and display it in a field?

Thanks for help!

SF
Last edit: 13 years 4 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48445
  • Thanks: 8280
  • Karma: 1443
13 years 6 months ago #161400 by krileon
Replied by krileon on topic Re: Retrieve user IP for cb field?
CBSubs stores a users IP Address in the database table _cbsubs_subscriptions when a subscription is made. You can retrieve this using a database query. To display that queries results as a field you'll need incubator project CB Query Field which renders a database queries results as a CB Field (non-searchable on userlists).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: socialfan

Please Log in or Create an account to join the conversation.

  • socialfan
  • socialfan
  • OFFLINE
  • Posts: 262
  • Thanks: 9
  • Karma: -1
13 years 6 months ago #161428 by socialfan
Replied by socialfan on topic Re: Retrieve user IP for cb field?
thank you,

is there IP information in the standard cb or joomla user tables?

regards,
SF

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48445
  • Thanks: 8280
  • Karma: 1443
13 years 6 months ago #161567 by krileon
Replied by krileon on topic Re: Retrieve user IP for cb field?
Joomla, no. CB, yes within database table _comprofiler_sessions. No idea the accuracy of this table however. It maybe best to develop an integration to obtain and store the IP and various CB triggers such as after login. CB also stores the users IP address at time of registration to _comprofiler.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: socialfan

Please Log in or Create an account to join the conversation.

13 years 5 months ago #164507 by downunder_2
Replied by downunder_2 on topic Re: Retrieve user IP for cb field?
Hi, I am using Joomla 1.6.3 and the latest CB, I am also a Joomla newbie who suffers multiple illnesses which make these things difficult to understand.
I am nearly ready to go live with my site but the thing that really scares me is not having I.P. addresses showing up anywhere.
With my current CMS I am about to delete, I am constantly getting spammers and hackers trying to gain access from countries such as Poland, China, Indonesia, Russia, etc, I can stop these causing damage by not allowing them in by doing a quick search of their I.P. addresses which show up in the new registration email.
Is there an easy way for IP addresses to be included in either new registration email, "My Settings" tab, or even an extra user management field?
Thank you :unsure:

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48445
  • Thanks: 8280
  • Karma: 1443
13 years 5 months ago #164792 by krileon
Replied by krileon on topic Re: Retrieve user IP for cb field?
IP Address has always been provided with registrations via the "registeripaddr" database column in _comprofiler database table. This is set at the time of registration only however. To display this on profile you could use delimiter field with the contents of [registeripaddr] or use incubator project CB Query Field to query the database for this column using the below query.
Code:
SELECT `registeripaddr` FROM `#__comprofiler` WHERE `id` = [user_id]

Additionally to prevent spam it's best to combine subscriber or individually purchased available plugin CB Captcha. This would eliminate all or nearly all automated spam bots.

Please keep in mind IP Address is HIGHLY unreliable. The user could simply use a proxy, which is VERY easy to do. They could re-register with a new IP, etc.. With captcha in place you should not have many spam issues as it's a good deterrent for spammers and often causes them too much trouble to bother.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum