增加邮箱为空的判断

dev_partners
Alec Zhou 6 years ago
parent 081eef9fb5
commit 2f92f650d5

@ -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')

Loading…
Cancel
Save