Drupal - Flagging nodes on behalf of another user(programmatically)
I have a custom module which allows a user to invite friends to see his/her favourite(flagged) nodes.
Upon the invitation/registration.. I want to be able to duplicate the (inviter)users flags for the new(invited) user.
i read http://drupal.org/node/305086 and it says to use:
开发者_如何转开发function flag($action, $content_id, $account = NULL, $skip_permission_check = FALSE)
however regardless what value i put in for $account the new flag is not created for the new user.
can anybody assist please!
$account
must be a user object, implemented with $account = user_load(array('uid' => 123));
. Are you doing this?
精彩评论