diff --git a/user/profile/lib.php b/user/profile/lib.php index 5a040aa609d..1e2f954d7e2 100644 --- a/user/profile/lib.php +++ b/user/profile/lib.php @@ -210,7 +210,7 @@ class profile_field_base { */ public function edit_field_set_required($mform) { global $USER; - if ($this->is_required() && ($this->userid == $USER->id)) { + if ($this->is_required() && ($this->userid == $USER->id || isguestuser())) { $mform->addRule($this->inputname, get_string('required'), 'required', null, 'client'); } }