If authorid=2 writes an entry, this entry will get uderid=0 in the entries table.
Help!
Cheers,
Martin
Code: Select all
if (!is_numeric($entry['id'])) {
/* we need to insert */
unset($entry['id']);
$entry['comments'] = 0;
// New entries need an author
$entry['author'] = $serendipity['user'];
if (!isset($entry['authorid']) || empty($entry['authorid'])) {
$entry['authorid'] = $serendipity['authorid'];
}
Code: Select all
if (!is_numeric($entry['id'])) {
/* we need to insert */
unset($entry['id']);
$entry['comments'] = 0;
// New entries need an author
$entry['author'] = $serendipity['user'];
if (!isset($entry['authorid']) || empty($entry['authorid'])) {
$entry['authorid'] = $serendipity['authorid'];
}
echo "Entry author: {$entry['author']}<br />\n";
echo "Entry author ID: {$entry['authorid']}<br />\n";
echo "Serendipity debug: " . print_r($serendipity, true) . "<br />\n";
echo "Session debug: " . print_r($_SESSION, true) . "<br />\n";