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

Commit

Permalink
always clean/reset the session variable before reading options
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsombor Franczia committed Sep 11, 2014
1 parent e04dd1f commit 5f6fcb7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions integration/laraveladministrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@ static function runIntegration() {
$iStartedTheSession = true;
}

if (!isset($_SESSION['KCFINDER'])) {
$_SESSION['KCFINDER'] = array();
}
//clean and reset the session variable to read options correctly
$_SESSION['KCFINDER'] = array();

//if this is a simple true value, user is logged in
if ($hasPermission == true) {
Expand Down Expand Up @@ -112,9 +111,6 @@ static function runIntegration() {

}
}
else {
$_SESSION['KCFINDER']['disabled'] = true;
}

//close the session if I started it
if (isset($iStartedTheSession)) {
Expand Down

0 comments on commit 5f6fcb7

Please sign in to comment.