Remove obsolete call to getSessionByUserID in SessionHandler::create()
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 1 Oct 2020 09:42:09 +0000 (11:42 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 1 Oct 2020 10:03:44 +0000 (12:03 +0200)
commit204ca8aca6530591b92edd61d51d2329220dc209
treefda0a1960d7efc95d9ca975f9306ac5decc47c7e
parent7ecbd754d004d3bb696062ffee49954df614093e
Remove obsolete call to getSessionByUserID in SessionHandler::create()

This call will always return `null`, since the user always is a guest at that
point, passing a `null` to the database query selecting rows `WHERE userID = ?`.

Incidentally it took me a while to understand why this would not return
existing guest sessions, until I remembered that `NULL` does not equal anything
in SQL and instead `IS NULL` needs to be used. It's good that this slightly
misleading part of the code is gone.
wcfsetup/install/files/lib/system/session/SessionHandler.class.php