/** * Get rid of an AuthTicket - usually at logout. * * @param AuthTicketModel $model * @throws ControllerException */ public function delete($model) { $authTicket = $model->getAuthTicket(); $sql = "DELETE FROM auth_ticket" . " WHERE auth_ticket = ?"; $stmt = $this->_dbh->prepare($sql); if (!$stmt) { throw new ControllerException('Prepared statement failed for ' . $sql); } if (!$stmt->bind_param('s', $authTicket)) { throw new ControllerException('Binding parameters for prepared statement failed.'); } if (!$stmt->execute()) { throw new ControllerException('Failed to execute DELETE statement. (' . $this->_dbh->error . ')'); } /** * @SuppressWarnings checkAliases */ if (!$stmt->close()) { throw new ControllerException('Something broke while trying to close the prepared statement.'); } return; }