Skip to content

Commit

Permalink
Fix session expired duplicate message
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsonge committed Mar 27, 2016
1 parent aa99b10 commit 8dac1f2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions libraries/joomla/session/session.php
Expand Up @@ -604,8 +604,16 @@ public function start()
// Perform security checks
if (!$this->_validate())
{
// Destroy the session if it's not valid
$this->destroy();
// If the session isn't valid because it expired try to restart it
// else destroy it.
if ($this->_state === 'expired')
{
$this->restart();
}
else
{
$this->destroy();
}
}

if ($this->_dispatcher instanceof JEventDispatcher)
Expand Down

0 comments on commit 8dac1f2

Please sign in to comment.