Why is it when I add "Special:UserLogin|Login" to the sidebar I get redirected to the main page?
Thanks for your help!
Phil
On Mon, 22 Dec 2014 19:26:04 +0100, Legault, Phillip [ITSUS] PLEGAULT@its.jnj.com wrote:
Why is it when I add "Special:UserLogin|Login" to the sidebar I get redirected to the main page?
Because you're already logged in, so MediaWiki helpfully skips the login form. This behavior was changed again in https://gerrit.wikimedia.org/r/#/c/161465/ (allowing you to view the form and displaying appropriate message, as seen on Wikimedia wikis), but that patch didn't make the 1.24 release.
Sorry maybe I did not explain correctly When the users come to the page they are not immediately logged in.
I use this $wgHooks['SkinBuildSidebar'][] = 'lfHideSidebar'; function lfHideSidebar( $skin, &$bar ) { global $wgUser; // Hide sidebar for anonymous users if ( !$wgUser->isLoggedIn() ) { $bar = array( 'navigation' => array( array( 'text' => wfMsg( 'login' ), 'href' => SpecialPage::getTitleFor( 'Login' )->getLocalURL(), 'id' => 'n-login', 'active' => '' ) ) ); } return true; }
And if someone goes to a page before they login and select login they are returned to the home page.
Can I get the returnto, to work with this hook?
-----Original Message----- From: mediawiki-l-bounces@lists.wikimedia.org [mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Bartosz Dziewonski Sent: Monday, December 22, 2014 2:26 PM To: MediaWiki announcements and site admin list Subject: Re: [MediaWiki-l] Special:UserLogin
On Mon, 22 Dec 2014 19:26:04 +0100, Legault, Phillip [ITSUS] PLEGAULT@its.jnj.com wrote:
Why is it when I add "Special:UserLogin|Login" to the sidebar I get redirected to the main page?
Because you're already logged in, so MediaWiki helpfully skips the login form. This behavior was changed again in https://gerrit.wikimedia.org/r/#/c/161465/ (allowing you to view the form and displaying appropriate message, as seen on Wikimedia wikis), but that patch didn't make the 1.24 release.
-- Bartosz Dziewoński
_______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
mediawiki-l@lists.wikimedia.org