Ensure login button is only rendered for anon users

Bug: T276561
Change-Id: I0f4fa94b4caacc45b299d7518523aa906ff65849
This commit is contained in:
bwang 2021-06-14 09:33:29 -05:00
parent c7ad20524c
commit 22e343eecb
1 changed files with 3 additions and 2 deletions

View File

@ -242,9 +242,10 @@ class SkinVector extends SkinMustache {
$useCombinedLoginLink = $this->useCombinedLoginLink();
$htmlCreateAccount = $this->getCreateAccountHTML( $returnto );
$userMenuData = $menuData[ 'data-user-menu' ];
$userMenuData[ 'html-before-portal' ] = $this->getLoginHTML( $returnto, $useCombinedLoginLink );
if ( !$isAnon ) {
if ( $isAnon ) {
$userMenuData[ 'html-before-portal' ] .= $this->getLoginHTML( $returnto, $useCombinedLoginLink );
} else {
// Appending as to not override data potentially set by the onSkinAfterPortlet hook.
$userMenuData[ 'html-after-portal' ] .= $this->getLogoutHTML();
}