mirror of
https://github.com/discourse/discourse.git
synced 2025-05-28 13:51:18 +08:00
DEV: Update to lastest rubocop-discourse
This commit is contained in:

committed by
Loïc Guitaut

parent
3b6d4c830f
commit
2a28cda15c
@ -75,7 +75,7 @@ class ImportScripts::Kunena < ImportScripts::Base
|
||||
results =
|
||||
@client.query("SELECT id, username, email, registerDate FROM jos_users;", cache_rows: false)
|
||||
results.each do |u|
|
||||
next unless u["id"].to_i > (0) && u["username"].present? && u["email"].present?
|
||||
next if u["id"].to_i <= (0) || u["username"].blank? || u["email"].blank?
|
||||
username = u["username"].gsub(" ", "_").gsub(/[^A-Za-z0-9_]/, "")[0, User.username_length.end]
|
||||
if username.length < User.username_length.first
|
||||
username = username * User.username_length.first
|
||||
|
Reference in New Issue
Block a user