diff --git a/modules/com_vtiger_workflow/VTWorkflowUtils.php b/modules/com_vtiger_workflow/VTWorkflowUtils.php index f671da0e2..2057543d4 100644 --- a/modules/com_vtiger_workflow/VTWorkflowUtils.php +++ b/modules/com_vtiger_workflow/VTWorkflowUtils.php @@ -66,7 +66,8 @@ function loggedInUser() { function revertUser() { global $current_user; if (count(self::$userStack) != 0) { - $current_user = array_pop(self::$userStack); + array_splice(self::$userStack, 1); + $current_user = self::$userStack[0]; } else { $current_user = null; }