Build `primary_email` association directly in `DiscourseSingleSignOn`.
This commit is contained in:
parent
28baf97a00
commit
d0e7898fa0
|
@ -135,7 +135,7 @@ class DiscourseSingleSignOn < SingleSignOn
|
||||||
try_username = username.presence
|
try_username = username.presence
|
||||||
|
|
||||||
user_params = {
|
user_params = {
|
||||||
email: email,
|
primary_email: UserEmail.new(email: email, primary: true),
|
||||||
name: try_name || User.suggest_name(try_username || email),
|
name: try_name || User.suggest_name(try_username || email),
|
||||||
username: UserNameSuggester.suggest(try_username || try_name || email),
|
username: UserNameSuggester.suggest(try_username || try_name || email),
|
||||||
ip_address: ip_address
|
ip_address: ip_address
|
||||||
|
|
Loading…
Reference in New Issue