0

There was an error that corrupted a bunch of users' sessions and I'm wondering if there's a way to remove/reset all sessions without making them all go through our logout script.

I'd like something that does what this does

$auth = $this->getServiceLocator()->get('Zend\Authentication\AuthenticationService');                               
if($auth->hasIdentity()) {          
    $auth->clearIdentity();             
}

but for every existing user session.

Bogdan
  • 1,869
  • 6
  • 24
  • 53
  • It's not a ZF2 specific function, take a look at the answers here -> http://stackoverflow.com/questions/5193744/how-to-kill-a-all-php-sessions – Crisp Dec 02 '15 at 16:51
  • @Crisp I tried those first of course, but it didn't destroy my sessions at all. – Bogdan Dec 03 '15 at 07:59

1 Answers1

0

The simplest way to clear all sessions is probably to delete all session files manually from your server.

Pouah
  • 23
  • 4