CookieSessionProvider: It's persisted if we have a 'Token' cookie
authorBrad Jorsch <bjorsch@wikimedia.org>
Tue, 16 Feb 2016 17:13:32 +0000 (12:13 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Tue, 16 Feb 2016 17:13:32 +0000 (12:13 -0500)
This aspect of the pre-SessionManager Setup.php code had been
overlooked.

This also updates an inaccurate doc comment that I happened to notice.

Bug: T125313
Change-Id: Id49836086be837012b02885ce5384ae6a4ebc105

includes/session/CookieSessionProvider.php
includes/session/SessionInfo.php

index f55c589..8d7830b 100644 (file)
@@ -148,6 +148,7 @@ class CookieSessionProvider extends SessionProvider {
                                        return null;
                                }
                                $info['userInfo'] = $userInfo->verified();
+                               $info['persisted'] = true; // If we have user+token, it should be
                        } elseif ( isset( $info['id'] ) ) {
                                $info['userInfo'] = $userInfo;
                        } else {
index ff40aa5..9c4a2bd 100644 (file)
@@ -203,9 +203,6 @@ class SessionInfo {
 
        /**
         * Return whether the session is persisted
-        *
-        * i.e. a session ID was given to the constuctor
-        *
         * @return bool
         */
        final public function wasPersisted() {