diff --git a/app/controllers/oauth_controller.rb b/app/controllers/oauth_controller.rb index 714bd610..f2a797b7 100644 --- a/app/controllers/oauth_controller.rb +++ b/app/controllers/oauth_controller.rb @@ -196,6 +196,8 @@ class OauthController < ApplicationController UserExtensions.create!(user_id: user.id, school_id: School.first.id, identity: 4, gender: 0) openi = Openi.create!(user_id: user.id, openi_user_id: openi_user_id, avatar_url: avatar_url, login: login, name: name, email: email) + openi.user = user + openi.save! end end