The discussion in T405440 highlights the need for a reliable way to determine the type of account being created during autocreateaccount. At present, this often requires using a brittle condition like accountname regex '^~2'.
This approach has several drawbacks:
- It breaks global filters in wiki-farm environments where some projects have Temporary Accounts enabled and others don't.
- Although the condition may look simple enough, why it works may not be obvious to users who are unfamiliar with matchPattern in the $wgAutoCreateTempUser configuration.
- The pattern '^~2' will break in the future, though not imminently.
Acceptance criteria
- Introduce an account_type variable
- Rename accountname to account_name, deprecating the former