Skip to content

Commit

Permalink
Fix db field
Browse files Browse the repository at this point in the history
  • Loading branch information
dasistwas committed Jul 29, 2023
1 parent c112488 commit 4d7c2f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classes/observer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 4d7c2f9

Please sign in to comment.