diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Light.php b/workflow/engine/src/ProcessMaker/Services/Api/Light.php index cf6b07266..32757d56a 100644 --- a/workflow/engine/src/ProcessMaker/Services/Api/Light.php +++ b/workflow/engine/src/ProcessMaker/Services/Api/Light.php @@ -43,12 +43,8 @@ class Light extends Api //Check if the user has the case $appDelegation = new \AppDelegation(); $aCurUser = $appDelegation->getCurrentUsers($applicationUid, $delIndex); - if (!empty($aCurUser)) { - foreach ($aCurUser as $key => $value) { - if ($value === $userUid) { - return true; - } - } + if (!empty($aCurUser) && in_array($userUid, $aCurUser)) { + return true; } return false; break;