mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-52576 forum: fix user profile picture in external service
This commit is contained in:
parent
ef343c3299
commit
14ebc39645
1 changed files with 5 additions and 5 deletions
|
@ -478,15 +478,15 @@ class mod_forum_external extends external_api {
|
||||||
$post->children = array();
|
$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 = new stdclass();
|
||||||
$user->id = $post->userid;
|
$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);
|
$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.
|
// Rewrite embedded images URLs.
|
||||||
list($post->message, $post->messageformat) =
|
list($post->message, $post->messageformat) =
|
||||||
external_format_text($post->message, $post->messageformat, $modcontext->id, 'mod_forum', 'post', $post->id);
|
external_format_text($post->message, $post->messageformat, $modcontext->id, 'mod_forum', 'post', $post->id);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue