<p></p>
<p>All right, took me a while, but now I've got a basic idea of how the <code> PasswordHash.create()</code> function works. (I'm new to ruby and its syntax)</p>
<p>The code below is now working for me.</p>
<pre><code>bundle exec rails runner '
          pass_crypt, pass_salt = PasswordHash.create("test")
          admin = User.find_or_create_by(
            :email => "testuser10@osm.org",
            :email_valid => true,
            :display_name => "testuser10",
            :status => "confirmed",
            :terms_seen => true,
            :terms_agreed => Time.now.getutc,
            :data_public => true,
            :pass_crypt => pass_crypt,
            :pass_salt => pass_salt
          )
          admin.save!'
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/3101#issuecomment-864874169">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLNX57IL26R3C5WA7ADTT37PDANCNFSM4XYPNKVA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAK2OLNCAFOAKYPUURJBLWDTT37PDA5CNFSM4XYPNKVKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGOGO5OI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/3101#issuecomment-864874169",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/3101#issuecomment-864874169",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>