Hi,
I am trying to solve a following scenario, while working with mm_mailhandler (thanks for committing my previous patch!):
- Harvest from Email, mailhandler does the authentication, identifies a user
- Then save the attachments into node with CCK imagefield
However, something I don't understand:
- Both mm_node and mm_cck will always create nodes with anonymous user, instead of using the user identified in mail harvest
As far as I have looked into the code, none of these modules is using the data parsed by mailhandler (uid), it doesn't even receive it from Media Mover.
Therefore, I would like to know, how the methods should interact together? I need mm_node/mm_cck to get the node->uid from mm_mailhandler "harvest"
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 646686_mailhandler_harvest.patch | 1.13 KB | meba |
Comments
Comment #1
meba commentedOK, done a bit more research. I think both mm_node && mm_mailhandler are broken (or I don't get something).
If a harvest module returns items with a key ['data'], this data is passed to storage & complete modules.
I've seen this in one custom module, using $file['data']['user']->uid to identify the user (based on the harvest module). As far as I have understood, this object was returned by ftp harvest module.
Therefore:
1) mm_mailhandler should return $items['data']['user'] object instead of $items['node']->uid
2) mm_node should respect these settings
Can you, arthurf, confirm my findings? I would be happy to produce a (CVS :) patch then...
Comment #2
meba commentedOK, this patch fixes the thing, it's easier than I thought...
- Mailhandler correctly reports node and user to other modules, mm_node now succesfully saves the node with a proper title and author