diff --git a/lib/tasks/gitlab.rake b/lib/tasks/gitlab.rake index e21b5f329..9529ce4c2 100644 --- a/lib/tasks/gitlab.rake +++ b/lib/tasks/gitlab.rake @@ -6,7 +6,7 @@ namespace :gitlab do task :users => :environment do # User.where(username: 'root').find_each do |user| s = Trustie::Gitlab::Sync.new - User.where(login: 'guange1').find_each do |user| + User.find_each do |user| s.sync_user(user) end end diff --git a/lib/trustie/gitlab/sync.rb b/lib/trustie/gitlab/sync.rb index 91c241cea..597e01a36 100644 --- a/lib/trustie/gitlab/sync.rb +++ b/lib/trustie/gitlab/sync.rb @@ -30,7 +30,7 @@ module Trustie user.save! puts "create user #{user.login}" end - Helper.change_password(u.id, user.hashed_password, user.salt) + change_password(u.id, user.hashed_password, user.salt) rescue => e puts e end