aboutsummaryrefslogtreecommitdiffstats
path: root/includes/user/User.php
diff options
context:
space:
mode:
authorThalia <thalia.e.chan@googlemail.com>2023-05-10 14:57:25 +0100
committerThalia <thalia.e.chan@googlemail.com>2024-01-19 19:46:52 +0000
commit6e68107b3a56964e5b23cf575b905f8a6ed696d9 (patch)
tree3f22e996cb4dd5181914c5b66ee980f583730b85 /includes/user/User.php
parent00417f2b35bbaaebb4c26cf5659e47e1617a8ea9 (diff)
downloadmediawikicore-6e68107b3a56964e5b23cf575b905f8a6ed696d9.tar.gz
mediawikicore-6e68107b3a56964e5b23cf575b905f8a6ed696d9.zip
Set user.user_is_temp when creating a temporary user
TempUserCreator calls AuthManager::autoCreateUser, which calls User::addToDatabase. Set user_is_temp from addToDatabase. Inserts to the user table are done elsewhere, but they are not updated here. They don't insert temporary users, and user_is_temp defaults to false. Bug: T333223 Bug: T355175 Change-Id: I7c71fc7b4fd44e23cd4a68425f64bc631284a9b7
Diffstat (limited to 'includes/user/User.php')
-rw-r--r--includes/user/User.php1
1 files changed, 1 insertions, 0 deletions
diff --git a/includes/user/User.php b/includes/user/User.php
index 2c2008b61e92..b68e76bfff53 100644
--- a/includes/user/User.php
+++ b/includes/user/User.php
@@ -2715,6 +2715,7 @@ class User implements Authority, UserIdentity, UserEmailContact {
'user_registration' => $dbw->timestamp( $this->mRegistration ),
'user_editcount' => 0,
'user_touched' => $dbw->timestamp( $this->mTouched ),
+ 'user_is_temp' => $this->isTemp(),
] )
->caller( $fname )->execute();
if ( !$dbw->affectedRows() ) {