$bulknurl = $CFG->wwwroot.'/'.$CFG->admin.'/user/user_bulk.php';
// array of all valid fields for validation
-$STD_FIELDS = array('firstname', 'lastname', 'username', 'email', 'city', 'country', 'lang', 'auth', 'timezone', 'mailformat', 'maildisplay', 'htmleditor',
+$STD_FIELDS = array('firstname', 'lastname', 'username', 'email', 'city', 'country', 'lang', 'auth', 'timezone', 'mailformat', 'maildisplay', 'maildigest', 'htmleditor',
'ajax', 'autosubscribe', 'mnethostid', 'institution', 'department', 'idnumber', 'icq', 'phone1', 'phone2', 'address', 'url', 'description',
'oldusername', 'emailstop', 'deleted', 'password');
$mform->setDefault('mailformat', 1);
$mform->setAdvanced('mailformat');
+ $choices = array(0 => get_string('emaildigestoff'), 1 => get_string('emaildigestcomplete'), 2 => get_string('emaildigestsubjects'));
+ $mform->addElement('select', 'maildigest', get_string('emaildigest'), $choices);
+ $mform->setDefault('maildigest', 0);
+ $mform->setAdvanced('maildigest');
+
$choices = array(0 => get_string('autosubscribeyes'), 1 => get_string('autosubscribeno'));
$mform->addElement('select', 'autosubscribe', get_string('autosubscribe'), $choices);
$mform->setDefault('autosubscribe', 1);