diff --git a/lib/myprofilelib.php b/lib/myprofilelib.php index bb41000f2e9..30d4f899427 100644 --- a/lib/myprofilelib.php +++ b/lib/myprofilelib.php @@ -424,7 +424,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");