phpBB3 importer: Don't ignore users that belong to non-existent group

This commit is contained in:
Gerhard Schlager 2016-08-19 21:35:32 +02:00
parent fcfaa71e85
commit 5569afc48b
No known key found for this signature in database
GPG Key ID: 7DACA3C95B36014B
1 changed files with 1 additions and 2 deletions

View File

@ -7,7 +7,6 @@ module ImportScripts::PhpBB3
count(<<-SQL)
SELECT COUNT(*) AS count
FROM #{@table_prefix}users u
JOIN #{@table_prefix}groups g ON g.group_id = u.group_id
WHERE u.user_type != #{Constants::USER_TYPE_IGNORE}
SQL
end
@ -18,7 +17,7 @@ module ImportScripts::PhpBB3
u.user_type, u.user_inactive_reason, g.group_name, b.ban_start, b.ban_end, b.ban_reason,
u.user_posts, u.user_website, u.user_from, u.user_birthday, u.user_avatar_type, u.user_avatar
FROM #{@table_prefix}users u
JOIN #{@table_prefix}groups g ON (g.group_id = u.group_id)
LEFT OUTER JOIN #{@table_prefix}groups g ON (g.group_id = u.group_id)
LEFT OUTER JOIN #{@table_prefix}banlist b ON (
u.user_id = b.ban_userid AND b.ban_exclude = 0 AND
(b.ban_end = 0 OR b.ban_end >= UNIX_TIMESTAMP())