fix create cnmooc

pre_develop
p31729568 6 years ago
parent 965b320e2c
commit 41195aaa6e

@ -85,12 +85,14 @@ class CnmoocsService
lastname: name,
mail: mail,
mail_notification: mail,
login: login,
password: OauthController::DEFAULT_PASSWORD,
certification: 1
}
ActiveRecord::Base.transaction do
user = User.create!(create_params)
user = User.new(create_params)
# login 有问题,只能这样赋值
user.login = login
user.save!
UserExtensions.create!(user_id: user.id, school_id: School.first.id, identity: 4, gender: 0)

Loading…
Cancel
Save