Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
only clean the session variable if the user is not authenticated anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsombor Franczia committed Sep 12, 2014
1 parent 5f6fcb7 commit 8ffd517
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions integration/laraveladministrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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)) {
Expand Down

0 comments on commit 8ffd517

Please sign in to comment.