scopeContext === null) { $user = $this->session->getUser(); if (!$user || !$this->manager->isUserScopeEnabled()) { throw new OCSForbiddenException('User not logged in'); } $this->scopeContext = new ScopeContext(IManager::SCOPE_USER, $user->getUID()); } return $this->scopeContext; } }