mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:31:10 +08:00
DEV: Update to lastest rubocop-discourse
This commit is contained in:

committed by
Loïc Guitaut

parent
3b6d4c830f
commit
2a28cda15c
@ -94,7 +94,7 @@ class ImportScripts::Kunena < ImportScripts::Base
|
||||
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