forked from Trustie/forgeplus
fixed 第三方授权登录(github,gitee,qq,wechat)
This commit is contained in:
parent
763d7b499e
commit
6b846b10bb
|
@ -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?
|
||||
|
||||
|
|
Loading…
Reference in New Issue