From 3508f1b8e20f9664cfe26cfd0bcb318ee024b708 Mon Sep 17 00:00:00 2001 From: Lee Campbell Date: Thu, 20 Oct 2016 16:02:33 +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 f712a97464a..572e1810340 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); } }