Merge "collation: Refactor getFirstLetterData() cache handling"
[lhc/web/wiklou.git] / includes / session / SessionManagerInterface.php
index 14af630..d4e52c7 100644 (file)
@@ -24,6 +24,7 @@
 namespace MediaWiki\Session;
 
 use Psr\Log\LoggerAwareInterface;
+use User;
 use WebRequest;
 
 /**
@@ -43,7 +44,7 @@ interface SessionManagerInterface extends LoggerAwareInterface {
         * @param WebRequest $request Any existing associated session will be reset
         *  to the session corresponding to the data in the request itself.
         * @return Session
-        * @throws \\OverflowException if there are multiple sessions tied for top
+        * @throws \OverflowException if there are multiple sessions tied for top
         *  priority in the request. Exception has a property "sessionInfos"
         *  holding the SessionInfo objects for the sessions involved.
         */
@@ -72,6 +73,17 @@ interface SessionManagerInterface extends LoggerAwareInterface {
         */
        public function getEmptySession( WebRequest $request = null );
 
+       /**
+        * Invalidate sessions for a user
+        *
+        * After calling this, existing sessions should be invalid. For mutable
+        * session providers, this generally means the user has to log in again;
+        * for immutable providers, it generally means the loss of session data.
+        *
+        * @param User $user
+        */
+       public function invalidateSessionsForUser( User $user );
+
        /**
         * Return the HTTP headers that need varying on.
         *