Skip to content

Commit

Permalink
fix: Flarum users.is_email_confirmed cannot be null
Browse files Browse the repository at this point in the history
See bug report: #45 (comment)
"FLA_users is_email_confirmed cannot be null"
  • Loading branch information
linc committed Mar 3, 2024
1 parent db5d542 commit 267ea5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Target/Flarum.php
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,10 @@ protected function users(ExportModel $ex): void
'Name' => 'fixDuplicateDeletedNames',
'Email' => 'fixNullEmails',
];
$query = $ex->dbImport()->table('PORT_User')->select('*');
$query = $ex->dbImport()->table('PORT_User')->select(
'*',
$ex->dbImport()->raw('COALESCE(Confirmed, 0) as is_email_confirmed') // Cannot be null.
);

$ex->import('users', $query, $structure, $map, $filters);
}
Expand Down

0 comments on commit 267ea5d

Please sign in to comment.