summaryrefslogtreecommitdiffstats
path: root/application/models/SessionMapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/models/SessionMapper.php')
-rw-r--r--application/models/SessionMapper.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/application/models/SessionMapper.php b/application/models/SessionMapper.php
index c4187bd..dac5c4e 100644
--- a/application/models/SessionMapper.php
+++ b/application/models/SessionMapper.php
@@ -35,10 +35,19 @@ class Application_Model_SessionMapper
$data = array('sessionID'=> $sesion->getSessionID() ,'clientID'=> $sesion->getClientID() ,'bootosID'=> $sesion->getBootosID() ,'time'=> $sesion->getTime() ,'ip'=> $sesion->getIp() ,'ip6'=> $sesion->getIp6() );
if (null === ($id = $sesion->getID()) ) {
- unset($data['id']);
+ unset($data['sesionID']);
$this->getDbTable()->insert($data);
} else {
- $this->getDbTable()->update($data, array('id = ?' => $id));
+ $this->getDbTable()->update($data, array('sesionID = ?' => $id));
+ }
+ }
+
+ public function delete(Application_Model_Session $sesion)
+ {
+ if (null === ($id = $sesion->getID()) ) {
+ return;
+ } else {
+ $this->getDbTable()->delete(array('sesionID = ?' => $id));
}
}