[RSS Feed/News] How to get IPs of a specific user

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
I am attempting to call the getIpsByUser method located in XF/Repository/Ip. If it makes any difference, I'm calling it from a method in an item in XF/ApprovalQueue. I have tried calling it with both a user_id as well as a user entity object.

Code:

Code:
$content = $unapprovedItem->Content;
$userId = $content->user_id;
$user = \XF::em()->find('XF:User', $userId);
$ipRepo = $app->repository('XF:Ip');
$ips = $ipRepo->getIpsByUser($user);

I want a list of IP addresses the...

Read more
Read more about this Feed . . .
 
Status
Not open for further replies.
Back
Top Bottom