diff --git a/classes/observer.php b/classes/observer.php index b507265..b0278d3 100644 --- a/classes/observer.php +++ b/classes/observer.php @@ -45,7 +45,7 @@ public static function subscribe($userid, $courseid) { JOIN {course_modules} cm ON cm.instance = n.id JOIN {modules} m ON m.id = cm.module JOIN {user_info_field} uif - ON uif.id = n.profilefield + ON uif.id = n.aboprofilefield JOIN {user_info_data} uid ON uid.fieldid = uif.id JOIN {user} u diff --git a/db/upgrade.php b/db/upgrade.php index 4998b21..1bb67a1 100644 --- a/db/upgrade.php +++ b/db/upgrade.php @@ -393,7 +393,7 @@ function xmldb_newsletter_upgrade($oldversion) // Define field id to be added to newsletter. $table = new xmldb_table('newsletter'); - $field = new xmldb_field('profilefield', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'welcomemessageguestuser'); + $field = new xmldb_field('aboprofilefield', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, '0', 'welcomemessageguestuser'); // Conditionally launch add field id. if (!$dbman->field_exists($table, $field)) {