diff --git a/app/services/users_service.rb b/app/services/users_service.rb index 236dbc731..8b39c39ab 100644 --- a/app/services/users_service.rb +++ b/app/services/users_service.rb @@ -235,6 +235,15 @@ class UsersService if @current_user.check_password?(params[:password]) @current_user.password, @current_user.password_confirmation = params[:new_password], params[:new_password_confirmation] @current_user.save + # 修改密码同步gitlab密码修改 + unless @current_user.gid.nil? + begin + g = Gitlab.client + g.edit_user(@current_user.gid, :password => params[:new_password]) + rescue Exception => e + logger.error "change users password failed! ===> #{e}" + end + end #raise @current_user.errors.full_message #return @current_user else diff --git a/app/views/my/account.html.erb b/app/views/my/account.html.erb index be178607f..dc9ee10b6 100644 --- a/app/views/my/account.html.erb +++ b/app/views/my/account.html.erb @@ -170,7 +170,7 @@