MDL-69844 user: Fix no email in download_participants_table

Only include eMail in download_participants_table 
if selected in showuseridentity 
($identityfieldsselect)
This commit is contained in:
andreasschenkel
2020-10-30 13:57:29 +01:00
committed by Jenkins
parent d797697168
commit 2dc47fdeba
+1 -2
View File
@@ -91,7 +91,6 @@ if ($formaction == 'bulkchange.php') {
$columnnames = array(
'firstname' => get_string('firstname'),
'lastname' => get_string('lastname'),
'email' => get_string('email'),
);
$identityfields = get_extra_user_fields($context);
@@ -106,7 +105,7 @@ if ($formaction == 'bulkchange.php') {
list($insql, $inparams) = $DB->get_in_or_equal($userids);
}
$sql = "SELECT u.firstname, u.lastname, u.email" . $identityfieldsselect . "
$sql = "SELECT u.firstname, u.lastname" . $identityfieldsselect . "
FROM {user} u
WHERE u.id $insql";