mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-72153 privacy: correctly export user description/files.
This commit is contained in:
parent
707d09a568
commit
667f621ca6
1 changed files with 9 additions and 5 deletions
|
@ -376,7 +376,14 @@ class provider implements
|
||||||
'lastip' => $user->lastip,
|
'lastip' => $user->lastip,
|
||||||
'secret' => $user->secret,
|
'secret' => $user->secret,
|
||||||
'picture' => $user->picture,
|
'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),
|
'maildigest' => transform::yesno($user->maildigest),
|
||||||
'maildisplay' => $user->maildisplay,
|
'maildisplay' => $user->maildisplay,
|
||||||
'autosubscribe' => transform::yesno($user->autosubscribe),
|
'autosubscribe' => transform::yesno($user->autosubscribe),
|
||||||
|
@ -389,10 +396,7 @@ class provider implements
|
||||||
'middlename' => format_string($user->middlename, true, ['context' => $context]),
|
'middlename' => format_string($user->middlename, true, ['context' => $context]),
|
||||||
'alternatename' => format_string($user->alternatename, 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)
|
writer::with_context($context)->export_area_files([], 'user', 'profile', 0)
|
||||||
->export_data([], $data);
|
->export_data([], $data);
|
||||||
// Export profile images.
|
// Export profile images.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue