Permalink
Browse files

Fix incorrect expiry of sessions.

Fixes #3088
  • Loading branch information...
1 parent cffc36e commit c96e364cbb6ec8dd72dd220836a07ed104d2d50a @markstory markstory committed Aug 3, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/Cake/Model/Datasource/Session/DatabaseSession.php
@@ -137,6 +137,8 @@ public function destroy($id) {
public function gc($expires = null) {
if (!$expires) {
$expires = time();
+ } else {
+ $expires = time() - $expires;
}
return $this->_model->deleteAll(array($this->_model->alias . ".expires <" => $expires), false, false);
}

0 comments on commit c96e364

Please sign in to comment.