MDL-55345 user: correct userid when linking to iplookup from profile

This commit is contained in:
Paul Holden
2016-10-11 17:06:54 +02:00
committed by Eloy Lafuente (stronk7)
parent 81c5d47c2a
commit 6ce2b2b141
+1 -1
View File
@@ -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");