SessionBackend: skip isUserSessionPrevented check for anons
authorOri Livneh <ori@wikimedia.org>
Wed, 24 Feb 2016 23:32:57 +0000 (15:32 -0800)
committerOri Livneh <ori@wikimedia.org>
Wed, 24 Feb 2016 23:36:10 +0000 (15:36 -0800)
commit43420a0506b3115833d4b5d11b9e56579a967cdd
treeba1554fcd42be4c99b5da993cf4920bd86b468cd
parent8e6154c87897f30c2a5707eedab528a4761845a2
SessionBackend: skip isUserSessionPrevented check for anons

For anon requests, the call to SessionManager::isUserSessionPrevented(
$this->user->getName() ) is both expensive (because of the need to
sanitize the IP) and pointless, because the session-prevention feature
is intended for named accounts. So short-circuit the check if the user is not
logged in.

Change-Id: I17386b97e229b492723b46db1e1ae16fd4b0fc5a
includes/session/SessionBackend.php