MDL-45650 events: ensure correct objectid passed when triggering user_profile_viewed...
authorMark Nelson <markn@moodle.com>
Wed, 21 May 2014 07:25:17 +0000 (00:25 -0700)
committerMark Nelson <markn@moodle.com>
Wed, 21 May 2014 07:25:17 +0000 (00:25 -0700)
user/view.php

index 2e00875..39c4919 100644 (file)
@@ -190,7 +190,7 @@ if ($user->deleted) {
 // OK, security out the way, now we are showing the user.
 // Trigger a user profile viewed event.
 $event = \core\event\user_profile_viewed::create(array(
-    'objectid' => $USER->id,
+    'objectid' => $user->id,
     'relateduserid' => $user->id,
     'context' => $usercontext,
     'other' => array(