diff --git a/admin/tool/uploaduser/index.php b/admin/tool/uploaduser/index.php
index dcf16e41b09..eb881f6c911 100644
--- a/admin/tool/uploaduser/index.php
+++ b/admin/tool/uploaduser/index.php
@@ -86,7 +86,7 @@ $today = time();
$today = make_timestamp(date('Y', $today), date('m', $today), date('d', $today), 0, 0, 0);
// array of all valid fields for validation
-$STD_FIELDS = array('id', 'username', 'email',
+$STD_FIELDS = array('id', 'username', 'email', 'emailstop',
'city', 'country', 'lang', 'timezone', 'mailformat',
'maildisplay', 'maildigest', 'htmleditor', 'autosubscribe',
'institution', 'department', 'idnumber', 'skype',
diff --git a/admin/tool/uploaduser/user_form.php b/admin/tool/uploaduser/user_form.php
index 558f324cb09..59b913117e1 100644
--- a/admin/tool/uploaduser/user_form.php
+++ b/admin/tool/uploaduser/user_form.php
@@ -231,6 +231,11 @@ class admin_uploaduser_form2 extends moodleform {
$mform->setDefault('maildisplay', core_user::get_property_default('maildisplay'));
$mform->addHelpButton('maildisplay', 'emaildisplay');
+ $choices = array(0 => get_string('emailenable'), 1 => get_string('emaildisable'));
+ $mform->addElement('select', 'emailstop', get_string('emailstop'), $choices);
+ $mform->setDefault('emailstop', core_user::get_property_default('emailstop'));
+ $mform->setAdvanced('emailstop');
+
$choices = array(0 => get_string('textformat'), 1 => get_string('htmlformat'));
$mform->addElement('select', 'mailformat', get_string('emailformat'), $choices);
$mform->setDefault('mailformat', core_user::get_property_default('mailformat'));
diff --git a/lang/en/moodle.php b/lang/en/moodle.php
index 2051d59501c..2b2e9fa3d76 100644
--- a/lang/en/moodle.php
+++ b/lang/en/moodle.php
@@ -723,6 +723,7 @@ $string['emailresetconfirmationsubject'] = '{$a}: Password reset request';
$string['emailresetconfirmsent'] = 'An email has been sent to your address at {$a}.
It contains easy instructions to confirm and complete this password change.
If you continue to have difficulty, contact the site administrator.';
+$string['emailstop'] = 'Email stop';
$string['emailtoprivatefiles'] = 'You can also e-mail files as attachments straight to your private files space. Simply attach your files to an e-mail and send it to {$a}';
$string['emailtoprivatefilesdenied'] = 'Your administrator has disabled the option to upload your own private files.';
$string['emailvia'] = '{$a->name} (via {$a->siteshortname})';
diff --git a/lib/classes/user.php b/lib/classes/user.php
index 15d905fe0ba..40d99acc8b2 100644
--- a/lib/classes/user.php
+++ b/lib/classes/user.php
@@ -680,7 +680,7 @@ class core_user {
$fields['lastname'] = array('type' => PARAM_NOTAGS, 'null' => NULL_NOT_ALLOWED);
$fields['surname'] = array('type' => PARAM_NOTAGS, 'null' => NULL_NOT_ALLOWED);
$fields['email'] = array('type' => PARAM_RAW_TRIMMED, 'null' => NULL_NOT_ALLOWED);
- $fields['emailstop'] = array('type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED);
+ $fields['emailstop'] = array('type' => PARAM_INT, 'null' => NULL_NOT_ALLOWED, 'default' => 0);
$fields['icq'] = array('type' => PARAM_NOTAGS, 'null' => NULL_NOT_ALLOWED);
$fields['skype'] = array('type' => PARAM_NOTAGS, 'null' => NULL_ALLOWED);
$fields['aim'] = array('type' => PARAM_NOTAGS, 'null' => NULL_NOT_ALLOWED);