mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 16:32:18 +02:00
MDL-72153 privacy: correctly export user description/files.
This commit is contained in:
parent
036800d99d
commit
b45970de49
@ -376,7 +376,14 @@ class provider implements
|
||||
'lastip' => $user->lastip,
|
||||
'secret' => $user->secret,
|
||||
'picture' => $user->picture,
|
||||
'description' => format_text($user->description, $user->descriptionformat, ['context' => $context]),
|
||||
'description' => format_text(
|
||||
writer::with_context($context)->rewrite_pluginfile_urls(
|
||||
[],
|
||||
'user',
|
||||
'profile',
|
||||
'',
|
||||
$user->description
|
||||
), $user->descriptionformat, ['context' => $context]),
|
||||
'maildigest' => transform::yesno($user->maildigest),
|
||||
'maildisplay' => $user->maildisplay,
|
||||
'autosubscribe' => transform::yesno($user->autosubscribe),
|
||||
@ -389,10 +396,7 @@ class provider implements
|
||||
'middlename' => format_string($user->middlename, true, ['context' => $context]),
|
||||
'alternatename' => format_string($user->alternatename, true, ['context' => $context])
|
||||
];
|
||||
if (isset($data->description)) {
|
||||
$data->description = writer::with_context($context)->rewrite_pluginfile_urls(
|
||||
[get_string('privacy:descriptionpath', 'user')], 'user', 'profile', '', $data->description);
|
||||
}
|
||||
|
||||
writer::with_context($context)->export_area_files([], 'user', 'profile', 0)
|
||||
->export_data([], $data);
|
||||
// Export profile images.
|
||||
|
Loading…
x
Reference in New Issue
Block a user