I am not sure if this is a bug or support request, and apologize if this has been discussed before but I haven't had luck finding it in the issue tracker.

My template for "notifications for node updates" contains the following - and it works great. The only problem I am having is that I am not able to display the username of the person who made the update - intuitively I thought this would be [user-name] but instead it displays "Anonymous". I am presuming that this is because when cron runs, there is of course no user logged in and it is trying to get "The name of the currently logged in user."

Is there a token or some piece of info I am missing?

Thanks!

Tobias

Content:

[user-name] has updated the post by [author-name] below in the [ogname] group.
[log]
[title]
[url]
[node-body]

Digest line:

Edited by [user-name] [log] [url]

Comments

kbsymanz’s picture

I realize that this topic has been brought up before (#363409: Revisions event type and #384918: Like access to more detailed event information), but I believe that this feature would be extremely valuable for many users of the module. I know that it would make notifications "shine" for the sites that I am working on.

I looked through the code enough to determine that the solution is more complex than defining new tokens using the $node->revision_uid or $node->vid as values using hook_token_list() and hook_token_values(). When these are called, $node is pointing at the most recent revision already.

Somehow I am guessing that the vid of the revision needs to be stored when the notification event occurs. Then, again somehow, that vid could be used to generate the proper revision tokens. If anyone has any suggestions along these lines as to how to proceed, it would be appreciated.

Thanks for the notification module.

Kurt

stacysimpson’s picture

Status: Active » Closed (duplicate)

Even though this thread was first, there is some traction here:
http://drupal.org/node/1043458