From 05564a4cc6a59facc4cd4d32b78090cf2e600c59 Mon Sep 17 00:00:00 2001 From: David Monllao Date: Fri, 20 Apr 2018 17:46:49 +0200 Subject: [PATCH] MDL-61899 tool_dataprivacy: Add missing get_role_users fields --- admin/tool/dataprivacy/classes/api.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/admin/tool/dataprivacy/classes/api.php b/admin/tool/dataprivacy/classes/api.php index da87d8a129e..9ec5f45888f 100644 --- a/admin/tool/dataprivacy/classes/api.php +++ b/admin/tool/dataprivacy/classes/api.php @@ -140,8 +140,15 @@ class api { if (empty($roleid)) { continue; } + $allnames = get_all_user_name_fields(true, 'u'); + $fields = 'u.id, u.confirmed, u.username, '. $allnames . ', ' . + 'u.maildisplay, u.mailformat, u.maildigest, u.email, u.emailstop, u.city, '. + 'u.country, u.picture, u.idnumber, u.department, u.institution, '. + 'u.lang, u.timezone, u.lastaccess, u.mnethostid, u.auth, u.suspended, u.deleted, ' . + 'r.name AS rolename, r.sortorder, '. + 'r.shortname AS roleshortname, rn.name AS rolecoursealias'; // Fetch users that can manage data requests. - $dpos += get_role_users($roleid, $context); + $dpos += get_role_users($roleid, $context, false, $fields); } // If the site has no data protection officer, defer to site admin(s).