From 55975d0ae13a9497e350542dc996d5658af8c32d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 23 Apr 2020 15:40:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=86=E7=A0=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/trustie/gitlab/helper.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/trustie/gitlab/helper.rb b/lib/trustie/gitlab/helper.rb index 1da10044..5110b634 100644 --- a/lib/trustie/gitlab/helper.rb +++ b/lib/trustie/gitlab/helper.rb @@ -29,7 +29,9 @@ module Trustie u = find_user(user) unless u.present? if user.hashed_password.blank? - user.salt_password("edu12345678") + user.password = "edu12345678" + user.save! + Rails.logger.warn("user.hashed_password: #{user.hashed_password}") end u = self.g.create_user(user.mail, user.hashed_password, name: user.show_name, username: user.login, confirm: "true") Rails.logger.warn("create gitlab log ##user.mail is #{user.mail}, name is #{user.show_name}, u id is#{u.id}")