XF 1.2 What Table are IP Addresses Stored In

Wesker

Well-known member
Licensed customer
As the title says, what table are IP Addresses stored in for users when they login, post etc.
 
Mind sharing?

Update: I'm looking at the xf_ip table, and the actual IP field in phpMyAdmin... doesn't look like an IP Address at all
 
IPs are normally viewed through XenForo. They are not stored in a readable format in the database.

If you are running MySQL 5.6.3 or higher then this function should work to view the stored IPs in the xf_ip table:

Code:
SELECT INET6_NTOA(ip) AS ipaddress
FROM xf_ip

Otherwise there isn't an easy way to query the readable IP since XF started supporting IPv6 addresses.
 
Back
Top Bottom