Skip to content

Commit 9ccf0dd

Browse files
Merge pull request #7576 from nextcloud/backport/7546/stable32
2 parents 015a999 + 9753d31 commit 9ccf0dd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

lib/Db/SessionMapper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function find(int $boardId, string $userId, string $token): Session {
3434
throw new DoesNotExistException('Session is invalid');
3535
}
3636
$session = Session::fromRow($data);
37-
if ($session->getUserId() != $userId || $session->getBoardId() != $boardId) {
37+
if ($session->getUserId() !== $userId || $session->getBoardId() !== $boardId) {
3838
throw new DoesNotExistException('Session is invalid');
3939
}
4040
return $session;

lib/Service/AssignmentService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function assignUser($cardId, $userId, int $type = Assignment::TYPE_USER)
121121
$groups = array_filter($this->aclMapper->findAll($boardId), function (Acl $acl) use ($userId) {
122122
return $acl->getType() === Acl::PERMISSION_TYPE_GROUP && $acl->getParticipant() === $userId;
123123
});
124-
if (!in_array($userId, $boardUsers) && count($groups) !== 1) {
124+
if (!in_array($userId, $boardUsers, true) && count($groups) !== 1) {
125125
throw new BadRequestException('The user is not part of the board');
126126
}
127127

lib/Service/SessionService.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function closeSession(int $boardId, string $token): void {
7171
}
7272
$this->eventDispatcher->dispatchTyped(new SessionClosedEvent($boardId, $this->userId));
7373
}
74-
74+
7575
public function removeInactiveSessions(): int {
7676
return $this->sessionMapper->deleteInactive();
7777
}
@@ -90,7 +90,7 @@ public function notifyAllSessions(IQueue $queue, int $boardId, $event, $body, $c
9090
}
9191

9292
// don't notify the same user multiple times
93-
if (!in_array($session->getUserId(), $userIds)) {
93+
if (!in_array($session->getUserId(), $userIds, true)) {
9494
$userIds[] = $session->getUserId();
9595
}
9696
}

0 commit comments

Comments
 (0)