Skip to content
Snippets Groups Projects
Commit 560a0da9 authored by Olav Morken's avatar Olav Morken
Browse files

Session: Added deleteData function, which deletes data from the data store.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@804 44740490-163a-0410-bde0-09ae8108e29a
parent 873c0e54
No related branches found
No related tags found
No related merge requests found
...@@ -607,6 +607,31 @@ class SimpleSAML_Session { ...@@ -607,6 +607,31 @@ class SimpleSAML_Session {
} }
/**
* Delete data from the data store.
*
* This function immediately deletes the data with the given type and id from the data store.
*
* @param string $type The type of the data.
* @param string $id The identifier of the data.
*/
public function deleteData($type, $id) {
assert('is_string($type)');
assert('is_string($id)');
if (!is_array($this->dataStore)) {
return;
}
if(!array_key_exists($type, $this->dataStore)) {
return;
}
unset($this->dataStore[$type][$id]);
$this->dirty = TRUE;
}
/** /**
* This function stores data in the data store. * This function stores data in the data store.
* *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment