|
|
|
@ -185,7 +185,7 @@ class OauthController < ApplicationController
|
|
|
|
|
ActiveRecord::Base.transaction do
|
|
|
|
|
# 如果Educoder中已存在与该OpenI用户的邮箱相同的用户,则会直接跳转到登录educoder的登录页面
|
|
|
|
|
existing_user = User.find_by_mail(email)
|
|
|
|
|
break if existing_user.present?
|
|
|
|
|
break if existing_user.present? && email.present?
|
|
|
|
|
|
|
|
|
|
user = User.new(lastname: name, mail: email, mail_notification: email)
|
|
|
|
|
user.login = generate_login('m')
|
|
|
|
|