MDL-12789 - dont unnecessarily iterate over all groups
[moodle.git] / iplookup / index.php
CommitLineData
f4fb66d7 1<?php // $Id$
2 // Do an IP lookup of a user, using selected plugin
3
4 require('../config.php');
5
6 require_login();
7
8 $ip = optional_param('ip', getremoteaddr());
9 $user = optional_param('user', $USER->id);
10
11 if (empty($CFG->iplookup)) {
173006a3 12 set_config('iplookup', 'hostip');
f4fb66d7 13 }
14
15 require("$CFG->dirroot/iplookup/$CFG->iplookup/lib.php");
16
17 iplookup_display($ip, $user);
18
19?>