We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14368
    • 56 Posts
    I am using MODx Revolution 2.0.4-pl2.

    I need to create a number of users and email out their login details. This is all mostly working, except that in the email that gets sent out it lists their email address as their username. When they try to login with this, it fails, because the system expects them to use their username as the username which they don’t know because it isn’t included in the registration email.

    I am just using the default value for the System Setting ’Signup email’ which is:
    <p>Hello [[+ufn]],</p>     <p>Here are your login details for the [[+sname]] MODx Manager:</p>      <p>         <strong>Username:</strong> [[+uid]]<br />         <strong>Password:</strong> [[+pwd]]<br />     </p>      <p>Once you log into the MODx Manager at [[+surl]], you can change your password.</p>      <p>Regards,<br />Site Administrator</p>


    The uid parameter is set with the user email instead of the username, which is causing my problem. How do I fix it to use the username, any ideas?

    Thanks!
      • 14368
      • 56 Posts
      Still hoping for a solution to this as it’s a bit embarrassing when the first email I send out to new users tells them that the signup email is wrong and to use a different username instead.

      Anyone?
        • 14368
        • 56 Posts
        bump!
          • 28215
          • 4,149 Posts
          Can you file this here: http://bugs.modx.com/ and reference this forum post?
            shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
            • 14368
            • 56 Posts
            Thanks Shaun, I did this. Link to new bug -> http://bugs.modx.com/issues/2746
              • 2416
              • 3 Posts
              Since i havent found a way to reply to the bug i add my reply here..

              I also suddenly have this problem. All email regarding new user, passwd resett and so on the username is replaced by email..
              This is a major bug for me so i hope someone else can reproduce the problem and find a solution.

              Im not a programmer wink..

              - Audun
                • 10534
                • 40 Posts
                Bug report updated; the error is found in update.php: http://bugs.modx.com/projects/revo/repository/revisions/master/entry/core/model/modx/processors/security/user/update.php

                ’uid’ => $user->profile->get(’email’)
                should be changed to:
                ’uid’ => $user->profile->get(’username’)
                  • 14368
                  • 56 Posts
                  Thanks gavro and Shaun!

                  I updated update.php to ’uid’ => $user->get(’username’), and now my welcome emails are working correctly. Awesome!
                  Would be great to get this included in the next release.