Why: * When temporary accounts are disabled, no new temporary accounts should be created either on edit or through a CentralAuth autocreation. * UserNameUtils::isUsable is used to prevent the CentralAuth autocreation making the temporary account username not usable for login or account creation. * However, this check to determine if the name is reserved by the temporary user system still considers the name as a valid temporary account if the system was once enabled (but since disabled). * This is a bug, and instead if the feature is disabled the username should be considered unusable. This then prevents the CentralAuth autocreation on a wiki which knows the feature but has it disabled. What: * Update UserNameUtils::isUsable to return false if the name is reserved by the temporary user system and TempUserConfig::isEnabled returns false. * Test this new behaviour with a unit test. Bug: T370513 Change-Id: I467c39538796a660a7417397c99928a1a25007bc |
||
|---|---|---|
| .. | ||
| CentralId | ||
| Options | ||
| Registration | ||
| TempUser | ||
| ActorCacheTest.php | ||
| ActorStoreFactoryTest.php | ||
| UserArrayFromResultTest.php | ||
| UserGroupManagerFactoryTest.php | ||
| UserIdentityUtilsTest.php | ||
| UserIdentityValueTest.php | ||
| UserNamePrefixSearchTest.php | ||
| UserNameUtilsTest.php | ||
| UserTimeCorrectionTest.php | ||