This is the correct version of
0d262d1080533b952de104f45df7cf5a360d8892 which
was reverted in
7476740c8a03adc20f2d5f0380b47556f61edd8a.
During user change the guest legacy session is destroyed together with the
actual guest session and a new session with a matching legacy session is
created. At no point will a legacy session of a guest magically turn into a
legacy session of a user and thus an `UPDATE` is never required.
see #4067
private function createLegacySession(): LegacySession
{
- $spiderID = $this->getSpiderID(UserUtil::getUserAgent());
+ $spiderID = null;
+ if (!$this->user->userID) {
+ $spiderID = $this->getSpiderID(UserUtil::getUserAgent());
+ }
// save session
$sessionData = [