Commit 158e3de1ae8ffef80dcb4ecee6c41cd55aa5a6a0

Authored by Michael Joseph
1 parent 2bc06c15

corrected bug


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1529 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 2 additions and 2 deletions
lib/session/Session.inc
@@ -77,7 +77,7 @@ class Session { @@ -77,7 +77,7 @@ class Session {
77 // deletes any sessions for this userID where the default timeout has elapsed. 77 // deletes any sessions for this userID where the default timeout has elapsed.
78 $time = time() - $default->sessionTimeout; 78 $time = time() - $default->sessionTimeout;
79 $sql = $default->db; 79 $sql = $default->db;
80 - $sql->query("DELETE FROM $default->owl_sessions_table WHERE user_id =$userID AND lastused <= '" . formatDateTime($time) . "'"); 80 + $sql->query("DELETE FROM $default->owl_sessions_table WHERE user_id=$userID AND lastused <= '" . formatDateTime($time) . "'");
81 } 81 }
82 82
83 /** 83 /**
@@ -104,6 +104,7 @@ class Session { @@ -104,6 +104,7 @@ class Session {
104 if ($numrows >= 1) { 104 if ($numrows >= 1) {
105 $default->log->debug("Session::verify() found session in db"); 105 $default->log->debug("Session::verify() found session in db");
106 while($sql->next_record()) { 106 while($sql->next_record()) {
  107 + $iUserID = $sql->f("user_id");
107 $ip = $this->getClientIP(); 108 $ip = $this->getClientIP();
108 // check that ip matches 109 // check that ip matches
109 if ($ip == $sql->f("ip")) { 110 if ($ip == $sql->f("ip")) {
@@ -117,7 +118,6 @@ class Session { @@ -117,7 +118,6 @@ class Session {
117 // session has been verified, update status 118 // session has been verified, update status
118 $sessionStatus = 1; 119 $sessionStatus = 1;
119 // use userID to refresh user details and set on session 120 // use userID to refresh user details and set on session
120 - $iUserID = $sql->f("user_id");  
121 121
122 // ??: will this change during a user session? 122 // ??: will this change during a user session?
123 // only set the userID if its not in the array already 123 // only set the userID if its not in the array already