summaryrefslogtreecommitdiffstats
path: root/Auth/OpenID/FileStore.php
diff options
context:
space:
mode:
Diffstat (limited to 'Auth/OpenID/FileStore.php')
-rw-r--r--Auth/OpenID/FileStore.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/Auth/OpenID/FileStore.php b/Auth/OpenID/FileStore.php
index b53b7d2..b312a66 100644
--- a/Auth/OpenID/FileStore.php
+++ b/Auth/OpenID/FileStore.php
@@ -612,6 +612,19 @@ class Auth_OpenID_FileStore extends Auth_OpenID_OpenIDStore {
{
return @unlink($filename);
}
+
+ function cleanupAssociations()
+ {
+ $removed = 0;
+ foreach ($this->_allAssocs() as $pair) {
+ list($assoc_filename, $assoc) = $pair;
+ if ($assoc->getExpiresIn() == 0) {
+ $this->_removeIfPresent($assoc_filename);
+ $removed += 1;
+ }
+ }
+ return $removed;
+ }
}
?>