Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>EDIT after separate answer by OP:</strong> The following was based on the assumption that the <code>$u-&gt;uid</code> refers to the 'standard' Drupal user id, <strong>which is not correct!</strong> So one has to find the corresponding Drupal user by other means, if possible - see <a href="https://stackoverflow.com/questions/3032807/drupal-autoresponder-with-token-module#answer-3035793">the OPs answer for details</a> on this...</p> <hr> <p>I have not tested it, but looking at the autoresponder source code, you should be able to add (user) token replacement in the <code>autoresponder_mail()</code> function by inserting the following code before the preparation of the plain text body (before line 392 in the 6.x-1.0-alpha1 release):</p> <pre><code>// load the full user object $user = user_load($u-&gt;uid); // Replace user tokens in mail body $mail-&gt;body = token_replace($mail-&gt;body, 'user', $user); </code></pre> <p><em>Alternatively</em>, you could do it one function call earlier in <code>autoresponder_cron()</code>, within the <code>while ($message db_fetch_object($result_messages))</code> loop, before the <code>if (autoresponder_mail($u, $message))</code> call (line 366), using $message instead of $mail:</p> <pre><code>// load the full user object $user = user_load($u-&gt;uid); // Replace user tokens in mail body $message-&gt;body = token_replace($message-&gt;body, 'user', $user); </code></pre> <p>In case this works, you might want to submit it as a patch <a href="http://drupal.org/node/449650" rel="nofollow noreferrer">to the already existing feature request for this</a>. (I guess you are the 'keyzo'/'shane' who already answered there ;)</p> <p>If it works and you are going to create a patch, it would be 'standard' practice to add the hint on possible token replacement to the message definition form(s) in <code>autoresponder_mail_edit_create_form()</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload