From 546bc40c138e2243966b1e1a7802cc455a92cff8 Mon Sep 17 00:00:00 2001 From: Paul Holden Date: Tue, 26 Jul 2016 11:34:44 +0100 Subject: [PATCH] MDL-55345 user: correct userid when linking to iplookup from profile --- lib/myprofilelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/myprofilelib.php b/lib/myprofilelib.php index 49eff2908a4..54ea27c5cfc 100644 --- a/lib/myprofilelib.php +++ b/lib/myprofilelib.php @@ -422,7 +422,7 @@ function core_myprofile_navigation(core_user\output\myprofile\tree $tree, $user, // Last ip. if (has_capability('moodle/user:viewlastip', $usercontext) && !isset($hiddenfields['lastip'])) { if ($user->lastip) { - $iplookupurl = new moodle_url('/iplookup/index.php', array('ip' => $user->lastip, 'user' => $USER->id)); + $iplookupurl = new moodle_url('/iplookup/index.php', array('ip' => $user->lastip, 'user' => $user->id)); $ipstring = html_writer::link($iplookupurl, $user->lastip); } else { $ipstring = get_string("none"); -- 2.43.0