wiki.techinc.nl/includes/exception
Dreamy Jazz 0fa81768c2 Send temporary accounts to Special:CreateAccount on ::requireNamed
Why:
* When code throws a UserNotLoggedIn error for a temporary account,
  this takes them to Special:UserLogin and asks them to log in to
  an account
* Users using temporary accounts are less likely to have a named
  account, so should instead be sent to Special:CreateAccount
  (as described in T358586)
* When doing this, the warning message should be customised to
  talk about the user needing to create an account (and not
  log in)

What:
* Update UserNotLoggedIn to redirect to Special:CreateAccount
  when the user is logged in to a temporary account
** The code which constructs the exception object can override
   this and force the redirect to always be to Special:UserLogin.
* When the redirect is to Special:CreateAccount, allow customising
  the message shown by adding a '-for-temp-user' suffix to the
  message key in UserNotLoggedIn.
** This suffix is only added if the resulting message exists,
   so that code can choose whether they need a message that is
   different to the one on Special:UserLogin.
* Update SpecialPage::requiredNamedUser to allow special pages to
  force the redirect to always be to Special:UserLogin
** This is made use of in Special:ChangeEmail and
   Special:ConfirmEmail, as these special pages only make sense
   for use with an existing account.
* Update and add message keys to allow a different message for
  Special:CreateAccount.
* Update and add tests for these changes.

Bug: T358586
Change-Id: Ie0dd06f51b1e2b85eef6be377f673a02732ce604
2024-09-24 21:42:17 +00:00
..
Hook
BadRequestError.php
BadTitleError.php Use namespaced classes (2) 2024-06-16 20:23:55 +02:00
CannotCreateActorException.php
ErrorPageError.php Namespace MessageSpecifier under Wikimedia\Message\ 2024-07-28 14:21:32 +02:00
FatalError.php
HttpError.php exception: Avoid raw \n in HttpError 2024-07-16 21:39:19 +02:00
ILocalizedException.php Use namespaced classes (2) 2024-06-16 20:23:55 +02:00
LocalizedException.php Namespace MessageSpecifier under Wikimedia\Message\ 2024-07-28 14:21:32 +02:00
MWContentSerializationException.php
MWException.php namespace MWDebug 2024-05-03 22:59:47 +02:00
MWExceptionHandler.php exception: Use const for MWExceptionHandler::$fatalErrorTypes 2024-09-01 13:24:03 +02:00
MWExceptionRenderer.php Add missing documentation to class properties (miscellaneous classes) 2024-09-14 10:12:18 +02:00
MWUnknownContentModelException.php
PermissionsError.php Remove unchecked exception annotations 2024-09-17 22:20:58 +02:00
ProcOpenError.php
ReadOnlyError.php
ShellDisabledError.php
ThrottledError.php
UserBlockedError.php
UserNotLoggedIn.php Send temporary accounts to Special:CreateAccount on ::requireNamed 2024-09-24 21:42:17 +00:00