getSession() instanceof Memory) { /** @var Memory $session */ $session = \OC::$server->getSession(); $session->reopen(); } } }