Skip to content
Merged
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
Cast users and groups to array of strings
  • Loading branch information
caleeli committed Sep 27, 2024
commit e0638fd685a76b56c28690b44de2974ccce15a80
4 changes: 4 additions & 0 deletions ProcessMaker/Repositories/TokenRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ public function persistActivityActivated(ActivityInterface $activity, TokenInter
$evaluatedUsers = is_array($evaluatedUsers) ? $evaluatedUsers : [$evaluatedUsers];
$evaluatedGroups = is_array($evaluatedGroups) ? $evaluatedGroups : [$evaluatedGroups];

// convert to array of strings
$evaluatedUsers = array_map('strval', $evaluatedUsers);
$evaluatedGroups = array_map('strval', $evaluatedGroups);

$token->self_service_groups = ['users' => $evaluatedUsers, 'groups' => $evaluatedGroups];
break;
case 'rule_expression':
Expand Down