Merge pull request #4214 from gschlager/patch-1

Fix import from phpBB 3.1
This commit is contained in:
Arpit Jalan 2016-05-08 10:15:59 +05:30
commit ebb62193d1
1 changed files with 2 additions and 2 deletions

View File

@ -4,7 +4,7 @@ require_relative '../support/constants'
module ImportScripts::PhpBB3
class Database_3_1 < Database_3_0
def fetch_users(last_user_id)
query(<<-SQL)
query(<<-SQL, :user_id)
SELECT u.user_id, u.user_email, u.username,
CASE WHEN u.user_password LIKE '$2y$%'
THEN CONCAT('$2a$', SUBSTRING(u.user_password, 5))
@ -21,7 +21,7 @@ module ImportScripts::PhpBB3
(b.ban_end = 0 OR b.ban_end >= UNIX_TIMESTAMP())
)
WHERE u.user_id > #{last_user_id} AND u.user_type != #{Constants::USER_TYPE_IGNORE}
ORDER BY u.user_id ASC
ORDER BY u.user_id
LIMIT #{@batch_size}
SQL
end