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 |
Jump to:
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
I think this is a great feature and I wondered about this before. I'm wondering what the performance hit will be.
#2
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
Already fixed.
#4
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?