File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -1541,7 +1541,11 @@ function api_get_user_info(
15411541 $ result = Database::query ($ sql );
15421542 if (Database::num_rows ($ result ) > 0 ) {
15431543 $ result_array = Database::fetch_array ($ result );
1544- $ result_array ['auth_sources ' ] = api_get_user_entity ($ result_array ['id ' ])->getAuthSourcesAuthentications ();
1544+ $ result_array ['auth_sources ' ] = api_get_user_entity ($ result_array ['id ' ])
1545+ ->getAuthSourcesAuthentications (
1546+ Container::getAccessUrlUtil ()->getCurrent ()
1547+ )
1548+ ;
15451549 $ result_array ['user_is_online_in_chat ' ] = 0 ;
15461550 if ($ checkIfUserOnline ) {
15471551 $ use_status_in_platform = user_is_online ($ user_id );
@@ -1665,7 +1669,9 @@ function api_get_user_info_from_entity(
16651669 $ result ['address ' ] = $ user ->getAddress ();
16661670 $ result ['official_code ' ] = $ user ->getOfficialCode ();
16671671 $ result ['active ' ] = $ user ->isActive ();
1668- $ result ['auth_sources ' ] = $ user ->getAuthSourcesAuthentications ();
1672+ $ result ['auth_sources ' ] = $ user ->getAuthSourcesAuthentications (
1673+ Container::getAccessUrlUtil ()->getCurrent ()
1674+ );
16691675 $ result ['language ' ] = $ user ->getLocale ();
16701676 $ result ['creator_id ' ] = $ user ->getCreatorId ();
16711677 $ result ['created_at ' ] = $ user ->getCreatedAt ()->format ('Y-m-d H:i:s ' );
Original file line number Diff line number Diff line change @@ -77,9 +77,14 @@ public function getAuthSourceAuthentications(?AccessUrl $url): array
7777 $ authentications [] = UserAuthSource::LDAP ;
7878 }
7979
80+ $ oauthProviders = array_map (
81+ static fn (string $ provider ) => 'generic ' === $ provider ? UserAuthSource::OAUTH2 : $ provider ,
82+ array_keys ($ this ->getEnabledOAuthProviders ($ url ))
83+ );
84+
8085 return array_merge (
8186 $ authentications ,
82- array_keys ( $ this -> getEnabledOAuthProviders ( $ url ))
87+ $ oauthProviders
8388 );
8489 }
8590
You can’t perform that action at this time.
0 commit comments