diff --git a/apps/sharebymail/lib/ShareByMailProvider.php b/apps/sharebymail/lib/ShareByMailProvider.php index e7f1db25a9b8b..f1bb3fe94ca23 100644 --- a/apps/sharebymail/lib/ShareByMailProvider.php +++ b/apps/sharebymail/lib/ShareByMailProvider.php @@ -1108,9 +1108,10 @@ public function getAccessList($nodes, $currentAccess): array { )); $cursor = $qb->executeQuery(); - $public = $cursor->rowCount() > 0; + $public = false; $mail = []; while ($row = $cursor->fetch()) { + $public = true; if ($currentAccess === false) { $mail[] = $row['share_with']; } else {