title: How to make Moodle include user passwords in the e-mails it sends?
body: <p>I'm looking for a way to make Moodle 2.9 include <strong>user passwords</strong> in the introductory <strong>e-mails</strong> it sends upon manual upload of CSV table with new user data.</p>
  
  <p>So far it is sending introductory e-mails with text that is set up in the local_welcome plugin that is configurable via</p>
  
  <pre><code>Plugins/Local Plugins/Moodle welcome
  </code></pre>
  
  <p>This text contains fields such as [[username]], [[fullname]] which get replaced by the actual values, but no such field as [[password]].</p>
  
  <p>I have tried including both <pre>[[password]]</pre> and <pre>{$a->newpassword}</pre> in the text but neither works, Moodle does not replace these strings with the actual password; these strings are sent verbatim instead. This happens irrespective of whether the passwords are uploaded via the CSV or generated.</p>
  
  <p>So far I had no luck finding a solution to this on the web. The official help page on this function is unfortunately empty:
  <a href="https://docs.moodle.org/29/en/admin/setting/local_welcome" rel="nofollow">https://docs.moodle.org/29/en/admin/setting/local_welcome</a></p>
  
  <p>Strangely enough, when I create just one user by hand in Moodle via </p>
  
  <pre><code>Users/Add a new user, 
  </code></pre>
  
  <p>the e-mail it sends to the user is not that from plugin local_welcome. A string defined somewhere in the moodle php files is used. This contains string {$a->newpassword} and it works as expected; the user obtains both username and password.</p>
  
  <p>How do I make bulk upload behave similarly? I'm looking for any doable way to make this work. If my question is not clear, please ask in the comments.</p>