associate feed items with author

m3avrck - August 23, 2008 - 00:39
Project:SimpleFeed
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

When simplefeed runs, it runs through cron generally and feed items are created with the super user instead of the user that owns the feed (and persumably the feed items). We should make this happen using the psuedo code:

$user = user_load(array('uid' => $feed->uid));
// run drupal_execute_form()
// Load the anonymous user to prevent other strange errors
$user = drupal_anonymous_user();

Needs to be tested but this way if a user adds a blog, cron runs and grabs items, and user goes to delete their blog, all of those items should still be deleted since they are owner of it.

#1

mfer - August 28, 2008 - 11:28

I think this is a great feature and I wondered about this before. I'm wondering what the performance hit will be.

#2

m3avrck - August 28, 2008 - 15:37

Yes, it would slow down feed parsing a tad, user_load() can be slow.

However, maybe we can make a psuedo-user object.

$user = db_fetch_object(db_query(SELECT uid, name, mail FROM users));

That would be pretty efficient.

#3

m3avrck - September 29, 2008 - 23:59
Status:active» duplicate

Already fixed.

#4

plinan - October 22, 2008 - 02:17

I updated the module to the latest version but still am having the same problem. The feed items created by CRON are under the author "anonymous", instead of the user who created the feed. Is anyone seeing this?

 
 

Drupal is a registered trademark of Dries Buytaert.