Page 1 of 1
0.9 beta1 - entries with userid=0
Posted: Fri Oct 07, 2005 12:06 am
by cruiser
I run a 0.9 beta1 with two authors.
If authorid=2 writes an entry, this entry will get uderid=0 in the entries table.

as a result, nobody can comment this entry.
Help!
Cheers,
Martin
Re: 0.9 beta1 - entries with userid=0
Posted: Fri Oct 07, 2005 12:33 pm
by garvinhicking
Hi!
Could you please edit your include/functions_entries.inc.php file and locate the serendipity_updertEntry() function. Locate this code:
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'];
}
please modify this to:
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";
Then I would need the HTML output when you save an entry. Replace all sensitive information like passwords with "***" please.
Best regards,
Garvin