| @@ 64-75 (lines=12) @@ | ||
| 61 | return true; |
|
| 62 | } |
|
| 63 | ||
| 64 | public function housekeeping($timeUnix) |
|
| 65 | { |
|
| 66 | $stmt = $this->db->prepare( |
|
| 67 | sprintf( |
|
| 68 | 'DELETE FROM otp_log |
|
| 69 | WHERE time_unix < :time_unix' |
|
| 70 | ) |
|
| 71 | ); |
|
| 72 | ||
| 73 | $stmt->bindValue(':time_unix', $timeUnix, PDO::PARAM_INT); |
|
| 74 | $stmt->execute(); |
|
| 75 | } |
|
| 76 | ||
| 77 | public function init() |
|
| 78 | { |
|
| @@ 106-117 (lines=12) @@ | ||
| 103 | return true; |
|
| 104 | } |
|
| 105 | ||
| 106 | public function housekeeping($timeUnix) |
|
| 107 | { |
|
| 108 | $stmt = $this->db->prepare( |
|
| 109 | sprintf( |
|
| 110 | 'DELETE FROM connection_log |
|
| 111 | WHERE connected_at < :time_unix' |
|
| 112 | ) |
|
| 113 | ); |
|
| 114 | ||
| 115 | $stmt->bindValue(':time_unix', $timeUnix, PDO::PARAM_INT); |
|
| 116 | $stmt->execute(); |
|
| 117 | } |
|
| 118 | ||
| 119 | public function getAll() |
|
| 120 | { |
|