Logo Search packages:      
Sourcecode: letodms version File versions  Download package

LetoDMS_Session::deleteByTime ( sec )

Delete sessions older than a given time from the database

Parameters:
integer$secmaximum number of seconds a session may live
Returns:
boolean true if successful otherwise false

Definition at line 107 of file inc.ClassSession.php.

                                  { /* {{{ */
            $queryStr = "DELETE FROM tblSessions WHERE " . mktime() . " - lastAccess > ".$sec;
            if (!$this->db->getResult($queryStr)) {
                  return false;
            }
            return true;
      } /* }}} */

Generated by  Doxygen 1.6.0   Back to index