Commit graph

3 commits

Author SHA1 Message Date
Kosta Harlan
79cfe19109 TempAccounts: Make Throttler and WebRequest required
Why:

- In real world usages, both the Throttler and request objects are
  required. We can override these objects in tests easily enough and
  simplify the application code in the process.

What:

- Make Throttler and WebRequest objects required in
  `TempUserCreator::create()`

Depends-On: I13cb0dbeaa78e3ad5c7250c7565ee97099d97867
Change-Id: I5eaa68b8212570b3324a0fdec452189c6b56f810
2024-04-23 16:51:49 +00:00
Reedy
85396a9c99 tests: Fix @covers and @coversDefaultClass to have leading \
Change-Id: I5629f91387f2ac453ee4341bfe4bba310bd52f03
2024-02-16 22:43:56 +00:00
Dreamy Jazz
6487791074 Add a maintenance script to populate user_is_temp column
Why:
* The user_is_temp column exists in the user table to allow finding
  temporary users when reading from the DB directly.
* This column was added in f283c0e990,
  but this was not written to until
  6e68107b3a which was several months
  later and after a release version was branched.
* As such, we need a maintenance script to populate the user_is_temp
  column for wikis that have enabled temporary account creation.

What:
* Add a maintenance script named populateUserIsTemp.php which
  populates the user_is_temp column by looking for rows in the
  user table that have user_is_temp as 0 and have user_name match
  at least one temporary account match pattern. These rows are then
  updated to have user_is_temp as 1.
* This script will be added to update.php in a future commit, so that
  betawikis can have this run manually.
* Create unit tests and an integration test for this maintenance
  script.

Bug: T355181
Change-Id: I6223496d7aee65e3ab207fe86e386b01bef8b388
2024-01-24 14:16:39 +00:00