Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Sources/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -2914,6 +2914,16 @@ public static function loadMe(): self
self::$me->verifyPassword();
self::$me->verifyTfa();

/*
* Either of those can decide this is a guest after all, and the
* guest's data has not been loaded: the call above asked only for
* the member they claimed to be. Everything below here reads
* self::$profiles[0], so load it now that we know we need it.
*/
if (empty(self::$my_id) && !isset(self::$profiles[0])) {
self::loadUserData([0], self::LOAD_BY_ID, UserDataset::Minimal);
}

// At this point, we know the user ID for sure.
self::$me->id = self::$my_id;
self::$cookie_id = self::$my_id;
Expand Down