From 74866f8f163059172d0fd1ac1aefe36bd601dab1 Mon Sep 17 00:00:00 2001 From: Lee Campbell Date: Fri, 7 Oct 2016 12:39:25 +0100 Subject: [PATCH] MDL-56323 core_user: User profile field default value not on signup page The default value of a configured text input user profile field is not rendering on signup page --- user/profile/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user/profile/lib.php b/user/profile/lib.php index 4bb3f264a04..36a63e20d34 100644 --- a/user/profile/lib.php +++ b/user/profile/lib.php @@ -208,7 +208,7 @@ class profile_field_base { * @param moodleform $mform instance of the moodleform class */ public function edit_field_set_default($mform) { - if (!empty($default)) { + if (!empty($this->field->defaultdata)) { $mform->setDefault($this->inputname, $this->field->defaultdata); } }