Closed (won't fix)
Project:
Drupal core
Version:
5.20
Component:
node system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Aug 2009 at 10:22 UTC
Updated:
24 Jun 2011 at 17:32 UTC
When you switch "Change the name of the authoring user" to off in "/admin/settings/publishing_options" the uid of new nodes is always 0
Oliver
Original:
if (user_access('administer nodes')) {
// Populate the "authored by" field.
if ($account = user_load(array('name' => $node->name))) {
$node->uid = $account->uid;
}
else {
$node->uid = 0;
}
}Patch:
if (user_access('administer nodes')) {
// Populate the "authored by" field.
if ($account = user_load(array('name' => $node->name))) {
if($account->uid > 0){
$node->uid = $account->uid;
}
else {
$node->uid = $user->uid;
}
}
else {
$node->uid = 0;
}
}| Comment | File | Size | Author |
|---|---|---|---|
| node.module-D5.patch | 186 bytes | ohira |
Comments
Comment #1
drummPlease attach a unified diff. http://drupal.org/patch/create.
Comment #2
ohira commentedSorry, i can't do that.
Oliver
Comment #3
bradweikel commented"/admin/settings/publishing_options" is not a valid path in Drupal 5 core, and the phrase "Change the name of the authoring user" doesn't appear anywhere that I'm aware of.
Is there a contrib module involved? Google doesn't see it...
Comment #4
dpearcefl commentedConsidering the lack of activity on this issue and that Drupal v5 is no longer supported by for fixes or patches, I am going to close this ticket.
Comment #5
dpearcefl commented