Page MenuHomePhabricator

Improve redirection logic when system expects a named user
Open, Needs TriagePublic

Description

We have two helpers in MediaWiki Core SpecialPage handlers:

SpecialPage::requireLogin()
SpecialPage::requireNamedUser()

Those methods are used to trigger user type check, and when current user do not match expectations we redirect them to the Special:Userlogin page.

This redirection logic is correct for anonymous users, but temporary users are already logged in. Instead of redirect them to the Login page we should redirect them to Special:CreateAccount page and let them create an account.

This ticket as a result of a phab comment thread. For more info please refer to: https://phabricator.wikimedia.org/T326816#9554849