mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-42138 user: Require custom profile fields when registering as guest
Previously when someone registers after logging in as a guest, required custom profile fields would not be required. Thanks to Andreas Diendorfer for providing the patch.
This commit is contained in:
parent
88cd577ef3
commit
8ef7eade79
@ -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');
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user