MDL-47321 iplookup: Prevent guest users from using iplookup
This commit is contained in:
committed by
Sam Hemelryk
parent
c4a6c65c1b
commit
eb46bf2f4e
+5
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user