mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
MDL-52576 forum: fix user profile picture in external service
This commit is contained in:
parent
ef343c3299
commit
14ebc39645
@ -478,15 +478,15 @@ class mod_forum_external extends external_api {
|
||||
$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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user