Skip to content

Commit

Permalink
refactor(session):remove dup queries,refactorcode
Browse files Browse the repository at this point in the history
Signed-off-by: Hoang Pham <[email protected]>
  • Loading branch information
hweihwang committed May 7, 2024
1 parent 79a42d3 commit d307b7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Middleware/SessionMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private function assertUserOrShareToken(): void {

$documentId = $this->getDocumentId();

if ($userId = $this->getSessionUserId()) {
if (null !== ($userId = $this->getSessionUserId())) {
$this->assertUserHasAccessToDocument($userId, $documentId);

$this->userId = $userId;
Expand Down Expand Up @@ -220,7 +220,7 @@ private function setControllerData(ISessionAwareController $controller): void {
if ($this->session) {
$controller->setSession($this->session);
}
if ($this->userId) {
if (null !== $this->userId) {
$controller->setUserId($this->userId);
}
}
Expand Down

0 comments on commit d307b7c

Please sign in to comment.