diff options
author | Thibaut Girka <thib@sitedethib.com> | 2018-10-08 13:51:33 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2018-10-08 13:51:33 +0200 |
commit | d17844e6d1ad700df0f704972e2ce16e8693d33b (patch) | |
tree | ada49442558fb14c6cf97e79fb6e2dcaa237c7a6 /app/models/concerns | |
parent | 96c3d26870d4c8db1978c86b259e85d060d6f271 (diff) | |
parent | 4c4ff05a461eddafbf38c603b1bf2029be36a0b9 (diff) |
Merge branch 'master' into glitch-soc/merge-upstream
Diffstat (limited to 'app/models/concerns')
-rw-r--r-- | app/models/concerns/omniauthable.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/concerns/omniauthable.rb b/app/models/concerns/omniauthable.rb index 50288e700..f263fe7af 100644 --- a/app/models/concerns/omniauthable.rb +++ b/app/models/concerns/omniauthable.rb @@ -26,7 +26,7 @@ module Omniauthable # to prevent the identity being locked with accidentally created accounts. # Note that this may leave zombie accounts (with no associated identity) which # can be cleaned up at a later date. - user = signed_in_resource ? signed_in_resource : identity.user + user = signed_in_resource || identity.user user = create_for_oauth(auth) if user.nil? if identity.user.nil? @@ -61,7 +61,7 @@ module Omniauthable display_name = auth.info.full_name || [auth.info.first_name, auth.info.last_name].join(' ') { - email: email ? email : "#{TEMP_EMAIL_PREFIX}-#{auth.uid}-#{auth.provider}.com", + email: email || "#{TEMP_EMAIL_PREFIX}-#{auth.uid}-#{auth.provider}.com", password: Devise.friendly_token[0, 20], account_attributes: { username: ensure_unique_username(auth.uid), |