mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-47321 iplookup: Prevent guest users from using iplookup
This commit is contained in:
parent
3e312a16f4
commit
324b018bbc
1 changed files with 5 additions and 1 deletions
|
@ -27,7 +27,11 @@
|
|||
require('../config.php');
|
||||
require_once('lib.php');
|
||||
|
||||
require_login();
|
||||
require_login(0, false);
|
||||
if (isguestuser()) {
|
||||
// Guest users cannot perform lookups.
|
||||
throw new require_login_exception('Guests are not allowed here.');
|
||||
}
|
||||
|
||||
$ip = optional_param('ip', getremoteaddr(), PARAM_HOST);
|
||||
$user = optional_param('user', 0, PARAM_INT);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue