MyBB Community Forums

Full Version: Getting the user's last post IP.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is this possible via code?
IP Address: Logged < Click
OR
ACP > Users > *insert user name* > Options > Show IP Addresses
I meant if it's possible to do with code. Like you can get the last login IP via Database.
Not possible unless you run a query.
(2010-12-13, 06:04 AM)Yaldaram Wrote: [ -> ]Not possible unless you run a query.
What query would I have to run?
$query = $db->simple_select("users" , "*" , array('limit' => 1));
$ip = $db->fetch_field($query , "lastip");
(2010-12-13, 06:04 AM)Yaldaram Wrote: [ -> ]Not possible unless you run a query.

Don't give incorrect information.

http://mods.mybb.com/view/user-ip-log
(2010-12-13, 06:15 PM)UndiscoveredTalent Wrote: [ -> ]
(2010-12-13, 06:04 AM)Yaldaram Wrote: [ -> ]Not possible unless you run a query.

Don't give incorrect information.

http://mods.mybb.com/view/user-ip-log

You do realize that plugin contains if not the exact same, but a similar query? lol.
(2010-12-13, 11:51 PM)Mark.M Wrote: [ -> ]
(2010-12-13, 06:15 PM)UndiscoveredTalent Wrote: [ -> ]
(2010-12-13, 06:04 AM)Yaldaram Wrote: [ -> ]Not possible unless you run a query.

Don't give incorrect information.

http://mods.mybb.com/view/user-ip-log

You do realize that plugin contains if not the exact same, but a similar query? lol.

It doesn't matter. Still a plugin, does the same thing quicker and easier.
I think OP is trying to make their own plugin though, no?
Pages: 1 2