fixed 第三方授权登录(github,gitee,qq,wechat)

This commit is contained in:
xxq250 2022-12-01 17:51:54 +08:00
parent 763d7b499e
commit 6b846b10bb
1 changed files with 6 additions and 2 deletions

View File

@ -1,7 +1,7 @@
module RegisterHelper
extend ActiveSupport::Concern
def autologin_register(username, email, password, platform = 'forge', phone = nil, nickname =nil)
def autologin_register(username, email, password, platform = 'forge', phone = nil, nickname =nil, need_edit_info = false)
result = {message: nil, user: nil}
email = email.blank? ? "#{username}@example.org" : email
@ -10,7 +10,11 @@ module RegisterHelper
user.platform = platform
user.phone = phone if phone.present?
user.nickname = nickname if nickname.present?
user.activate
if need_edit_info
user.need_edit_info
else
user.activate
end
return unless user.valid?