From ed447986eaf3f17724146f0771ba6a184ec6fe2f Mon Sep 17 00:00:00 2001 From: kodumbeats Date: Tue, 9 Mar 2021 06:03:42 -0500 Subject: [PATCH] Use uppercase countryCode --- app/controllers/api/users.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/api/users.php b/app/controllers/api/users.php index efb0041ce..dbff5a019 100644 --- a/app/controllers/api/users.php +++ b/app/controllers/api/users.php @@ -205,8 +205,8 @@ App::get('/v1/users/:userId/sessions') continue; } - $token->setAttribute('countryName', (isset($countries[$token->getAttribute('contryCode')])) - ? $countries[$token->getAttribute('contryCode')] + $token->setAttribute('countryName', (isset($countries[strtoupper($token->getAttribute('contryCode'))])) + ? $countries[strtoupper($token->getAttribute('contryCode'))] : $locale->getText('locale.country.unknown')); $token->setAttribute('current', false);