|
|
@ -11,7 +11,12 @@ namespace :user do
|
|
|
|
|
|
|
|
|
|
|
|
no = sprintf("%04d", i)
|
|
|
|
no = sprintf("%04d", i)
|
|
|
|
login = "#{base_login}#{no}"
|
|
|
|
login = "#{base_login}#{no}"
|
|
|
|
user.update_attributes(:login => login, :lastname => login, :nickname => login)
|
|
|
|
puts no
|
|
|
|
|
|
|
|
puts login
|
|
|
|
|
|
|
|
user.login = login
|
|
|
|
|
|
|
|
user.lastname = login
|
|
|
|
|
|
|
|
user.nickname = login
|
|
|
|
|
|
|
|
user.save
|
|
|
|
end
|
|
|
|
end
|
|
|
|
rescue Exception => e
|
|
|
|
rescue Exception => e
|
|
|
|
Rails.logger.error(e.message)
|
|
|
|
Rails.logger.error(e.message)
|
|
|
|