// Try to update the session data in the database table. $db->setQuery($query);
if (!$db->execute()) { returnfalse; } /* Since $db->execute did not throw an exception, so the query was successful. Either the data changed, or the data was identical. In either case we are done. */ returntrue; } catch (Exception $e) { returnfalse; } }
/** * Read the data for a particular session identifier from the SessionHandler backend. * * @param string $id The session identifier. * * @return string The session data. * * @since 11.1 */ publicfunctionread($id) { // Get the database connection object and verify its connected. $db = JFactory::getDbo();
try { // Get the session data from the database table. $query = $db->getQuery(true) ->select($db->quoteName('data')) ->from($db->quoteName('#__session')) ->where($db->quoteName('session_id') . ' = ' . $db->quote($id));