From 47ad2a4d7a5b207d1ad26adfad5bbc460f14eba2 Mon Sep 17 00:00:00 2001 From: Angus McLeod Date: Wed, 24 Jul 2019 19:22:26 +1000 Subject: [PATCH] DEV: Handle both name formats in managed authenticator (#7925) --- lib/auth/managed_authenticator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/auth/managed_authenticator.rb b/lib/auth/managed_authenticator.rb index bdc7f0951c9..e8c74b44635 100644 --- a/lib/auth/managed_authenticator.rb +++ b/lib/auth/managed_authenticator.rb @@ -85,7 +85,7 @@ class Auth::ManagedAuthenticator < Auth::Authenticator result = Auth::Result.new info = auth_token[:info] result.email = info[:email] - result.name = "#{info[:first_name]} #{info[:last_name]}" + result.name = info[:first_name] && info[:last_name] ? "#{info[:first_name]} #{info[:last_name]}" : info[:name] result.username = info[:nickname] result.email_valid = primary_email_verified?(auth_token) if result.email result.extra_data = {