Allow logged-in users to view and use the login form again
authorBartosz Dziewoński <matma.rex@gmail.com>
Fri, 19 Sep 2014 15:10:40 +0000 (17:10 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 22 Sep 2014 14:02:00 +0000 (14:02 +0000)
commita94f11d625ea70f253e0d9620a44b447dd830b6b
tree5a341259de5866e995e981be384bf7f73bddb377
parent30646afb3688f735dda03f6bf025e3a014577d75
Allow logged-in users to view and use the login form again

The fix for bug 15484 (d0439af8) has introduced the behavior of
automatically redirecting users who view the login form when already
logged in to the requested 'returnto' location. If it was not given,
users were redirected to main page instead.

However, that has annoyed people who often switch between several
accounts and have grown accustomed to the old behavior of being able
to log in while logged in. Given that there are no conflicts between
these two features, let's just restore the old behavior when
Special:UserLogin is visited directly (no 'returnto' location given).

This reverts 5dfc57eb which removed then-dead code for showing login
form to logged-in users and tweaks an if() condition.

Bug: 70855
Change-Id: I7e40c13a6ca566b4d66d943c006af9edb6941ee9
includes/specials/SpecialUserlogin.php
includes/templates/Userlogin.php
languages/i18n/en.json
resources/src/mediawiki.special/mediawiki.special.userlogin.login.css