mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 02:52:44 +08:00
don't import data only available in a plugin in phpBB 3 importer
This commit is contained in:
parent
89f5c90ce0
commit
dad1e4b17d
|
@ -15,15 +15,13 @@ module ImportScripts::PhpBB3
|
|||
query(<<-SQL, :user_id)
|
||||
SELECT u.user_id, u.user_email, u.username, u.user_password, u.user_regdate, u.user_lastvisit, u.user_ip,
|
||||
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,
|
||||
CONCAT_WS(' ', pfd.pf_firstname, pfd.pf_lastname) name
|
||||
u.user_posts, u.user_website, u.user_from, u.user_birthday, u.user_avatar_type, u.user_avatar
|
||||
FROM #{@table_prefix}users u
|
||||
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())
|
||||
)
|
||||
LEFT OUTER JOIN #{@table_prefix}profile_fields_data pfd ON (pfd.user_id = u.user_id)
|
||||
WHERE u.user_id > #{last_user_id} AND u.user_type != #{Constants::USER_TYPE_IGNORE}
|
||||
ORDER BY u.user_id
|
||||
LIMIT #{@batch_size}
|
||||
|
|
|
@ -21,7 +21,7 @@ module ImportScripts::PhpBB3
|
|||
email: row[:user_email],
|
||||
username: row[:username],
|
||||
password: @settings.import_passwords ? row[:user_password] : nil,
|
||||
name: @settings.username_as_name ? row[:username] : row[:name],
|
||||
name: @settings.username_as_name ? row[:username] : row[:name].presence,
|
||||
created_at: Time.zone.at(row[:user_regdate]),
|
||||
last_seen_at: row[:user_lastvisit] == 0 ? Time.zone.at(row[:user_regdate]) : Time.zone.at(row[:user_lastvisit]),
|
||||
registration_ip_address: (IPAddr.new(row[:user_ip]) rescue nil),
|
||||
|
|
Loading…
Reference in New Issue
Block a user