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-11-03 12:34:28 +01:00
committed by Jenkins
parent 551892e2a7
commit 49afa008f4
+1 -2
View File
@@ -89,7 +89,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);
@@ -104,7 +103,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";