diff --git a/integration/laraveladministrator.php b/integration/laraveladministrator.php index d675d6b..195aa5b 100644 --- a/integration/laraveladministrator.php +++ b/integration/laraveladministrator.php @@ -81,8 +81,9 @@ static function runIntegration() { $iStartedTheSession = true; } - //clean and reset the session variable to read options correctly - $_SESSION['KCFINDER'] = array(); + if (!isset($_SESSION['KCFINDER'])) { + $_SESSION['KCFINDER'] = array(); + } //if this is a simple true value, user is logged in if ($hasPermission == true) { @@ -111,6 +112,10 @@ static function runIntegration() { } } + else { + //clean and reset the session variable + $_SESSION['KCFINDER'] = array(); + } //close the session if I started it if (isset($iStartedTheSession)) {