Skip to content

Commit 6b75b3a

Browse files
committed
Custom menu: Show all providers for sign in
1 parent d34c211 commit 6b75b3a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/OAuth2Client.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -404,13 +404,13 @@ public function getMenu(Tree $tree): ?Menu
404404
}
405405

406406
//Add submenu items to sign in with authorization providers
407-
$sign_in_button_labels = AuthorizationProviderFactory::getSignInButtonLabelsByUsers(Functions::getAllUsers());
407+
$sign_in_button_labels = AuthorizationProviderFactory::getSignInButtonLabels();
408408

409409
foreach ($sign_in_button_labels as $provider_name => $sign_in_button_label) {
410410

411411
$submenus[] = new Menu(I18N::translate('Sign in with') . ' ' . $sign_in_button_label,
412412
route(LoginWithAuthorizationProviderAction::class, [
413-
'tree' => $tree_name,
413+
'tree' => $tree instanceof Tree ? $tree->name() : null,
414414
'url' => $url,
415415
'provider_name' => $provider_name,
416416
]),
@@ -461,7 +461,7 @@ public function getMenu(Tree $tree): ?Menu
461461

462462
$submenus[] = new Menu($sub_menu_label . ' ' . $sign_in_button_label,
463463
route(LoginWithAuthorizationProviderAction::class, [
464-
'tree' => $tree instanceof Tree ? $tree->name() : null,
464+
'tree' => $tree_name,
465465
'url' => $url,
466466
'provider_name' => $provider_name,
467467
'user' => $user !== null ? $user->id() : 0,

0 commit comments

Comments
 (0)