You are here

function ip_tracker_user_records in IP address manager 7.2

Same name and namespace in other branches
  1. 8.2 ip.module \ip_tracker_user_records()
  2. 6 ip.module \ip_tracker_user_records()
  3. 7 ip.module \ip_tracker_user_records()

Get the records from the tracker for a user.

File

./ip.module, line 92
IP address manager module.

Code

function ip_tracker_user_records($uid) {
  $sql = "SELECT * FROM {ip_tracker} WHERE uid = :uid";
  $args = array(
    ':uid' => $uid,
  );
  $result = db_query($sql, $args);
  $rows = array();
  foreach ($result as $row) {
    $row->ip = long2ip($row->ip);
    $rows[] = $row;
  }
  return $rows;
}