Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/Service/ApprovalService.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,17 @@ public function getUserRules(string $userId, string $role = 'requesters', ?int $
}
// get display names
foreach ($userNames as $k => $v) {
// Cast keys to string: PHP coerces numeric string array keys to int
$k = (string)$k;
$user = $this->userManager->get($k);
$userNames[$k] = $user ? $user->getDisplayName() : $k;
}
if ($circlesEnabled) {
$circlesManager = \OC::$server->get(\OCA\Circles\CirclesManager::class);
$circlesManager->startSuperSession();
foreach ($circleNames as $k => $v) {
// Cast keys to string: PHP coerces numeric string array keys to int
$k = (string)$k;
try {
$circle = $circlesManager->getCircle($k);
$circleNames[$k] = $circle->getDisplayName();
Expand Down Expand Up @@ -853,7 +857,6 @@ public function propFind(int $nodeId): int {
return $state['state'];
}


/**
* Get approval state for multiple files and loads all the tags at once
*
Expand Down
Loading