FIX register with validate email
This commit is contained in:
parent
4902237bd7
commit
e5a46a242f
|
@ -3,7 +3,7 @@ module RegisterHelper
|
|||
|
||||
def autologin_register(username, email, password, platform= 'forge')
|
||||
result = {message: nil, user: nil}
|
||||
email ||= "#{username}@example.org"
|
||||
email = email.blank? ? "#{username}@example.org" : email
|
||||
|
||||
user = User.find_by(login: username)
|
||||
user ||= User.new(admin: false, login: username, mail: email, type: "User")
|
||||
|
|
Loading…
Reference in New Issue