Skip to content

Commit e4f1085

Browse files
Loads minimal user data for User::$me in upgrader
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
1 parent aab6add commit e4f1085

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Sources/Maintenance/Tools/Upgrade.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1220,10 +1220,11 @@ public function finalize(): bool
12201220

12211221
// Log what we've done.
12221222
if (!isset(User::$me)) {
1223-
User::load();
1223+
User::load(dataset: 'minimal');
12241224
}
12251225

12261226
if (empty(User::$me->id) && !empty($this->user['id'])) {
1227+
User::load($this->user['id'], dataset: 'minimal');
12271228
User::setMe($this->user['id']);
12281229
}
12291230

@@ -1608,6 +1609,7 @@ private function performSubsteps(array $substeps): bool
16081609

16091610
// Load up the current user safely.
16101611
if (!isset(User::$me)) {
1612+
User::load($this->user['id'], dataset: 'minimal');
16111613
User::setMe($this->user['id']);
16121614

16131615
if ($this->user['id'] === 0 && $this->user['name'] === 'Database Admin') {

0 commit comments

Comments
 (0)