Implicitly marking parameter $... as nullable is deprecated in PHP
8.4. The explicit nullable type must be used instead.
Bug: T376276
Change-Id: I867b777f6799a383f1a19165fbaa7b4c0d47d76c
Parent class constructor gets type-declaration in 1145328459
Remove simple doc-blocks without further information
Change-Id: I1b4dc8d9ca01bd9db2f7c461c12e9dff46d76214
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I3b0d2a2a25d4c4c9d11906961634eac1d47afa80
Because our log is restricted, we don't publish it to RecentChanges,
so it never ends up in CU. Let's be consistent and log these to
CheckUser as well.
Bug: T301992
Change-Id: I37dac4ecdcf70368f416fc2983afbb4238c19bb2
Also use namespaced class and AttributeManager::ATTR_LOCATORS
as seen in other extensions (like LoginNotify)
Change-Id: I183043ed91c20479b9594209341bf227507bb083
MediaWiki has never used this path for running the maintenance
scripts, only the class name provided in the other parameter.
Providing the parameter is no longer needed in MediaWiki 1.43.
Bug: T367918
Change-Id: I13b85b2f14bea802229a624ad0b8b2166845d1d1
We want to remove getModule() to support multiple different modules for
a single user.
Bug: T242031
Change-Id: Ic4967494494293aad6520ff27b11577d79f06ce4
Previously the `UserRepository::persist()` always expected
keys/modules to be present when called.
This patch provides support to persist disabled user.
This solves an issue introduced in
Ibc3df9d6c8beceeff4e11d024acc42cf45e42b28
Change-Id: I92aedf6e09d636b12c61fa15cf4c64055e3a549f
Unused. This was essentially disable() but with more handguns attached,
as it did not clear $module.
Depends-On: Ibc3df9d6c8beceeff4e11d024acc42cf45e42b28
Change-Id: Ic5b50dcba429e3a88561f1c081fb53788c474a0d
The current implementation of OATHUserRepository::persist() causes every
key to get a new ID when it's saved. This, combined with ::removeKey()
which compares keys by ID, means that using recovery codes to disable
TOTP is broken since TOTPKey calls persist() to mark the code as saved
just before the key is deleted.
In this patch I've chosen to add a new ::updateKey() method instead of
fixing ::persist(). This is more in line with the other new APIs in
OATHUserRepository (namely ::createKey() and ::removeKey()), and is
something I've been planning to do eventually - this bug just made that
a bit more urgent. ::persist() should be dropped once WebAuthn has been
updated too.
Tests are also updated - OATHUserRepositoryTest now updates the key
before deleting it and there's a new TOTPDisableFormTest to test the
entire disabling process.
Bug: T363548
Change-Id: I86ddc8e5bfc9cf74c587ffdff523f559c5a3c08c