Skip to content

Commit

Permalink
MDL-52576 forum: fix user profile picture in external service
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Kelada committed Jan 4, 2016
1 parent d92624e commit bc66f3d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mod/forum/externallib.php
Expand Up @@ -476,15 +476,15 @@ public static function get_forum_discussion_posts($discussionid, $sortby = "crea
$post->children = array();
}

$userpicture = new user_picture($post);
$userpicture->size = 1; // Size f1.
$post->userpictureurl = $userpicture->get_url($PAGE)->out(false);

$user = new stdclass();
$user->id = $post->userid;
$user = username_load_fields_from_object($user, $post);
$user = username_load_fields_from_object($user, $post, null, array('picture', 'imagealt', 'email'));
$post->userfullname = fullname($user, $canviewfullname);

$userpicture = new user_picture($user);
$userpicture->size = 1; // Size f1.
$post->userpictureurl = $userpicture->get_url($PAGE)->out(false);

// Rewrite embedded images URLs.
list($post->message, $post->messageformat) =
external_format_text($post->message, $post->messageformat, $modcontext->id, 'mod_forum', 'post', $post->id);
Expand Down

0 comments on commit bc66f3d

Please sign in to comment.