We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23510
    • 168 Posts
    See next message

    In the Login documentation, there are examples of using min.Length=6 for the password. However, as I discovered, users registered using 6 character passwords, will indeed get registered but they cannot login. This was a serious annoyance for me because I didn't know what was going wrong.

    I eventually changed the password manually in the Manager to an 8 character one, and it worked.

    I would suggest all the examples to use min.Length=8.
    [ed. note: pixelstation last edited this post 14 years, 9 months ago.]
      • 23510
      • 168 Posts
      Grrr, so apparantly that wasn;t it!

      I have registered a user on the front end. Username and password entered. Everything seems fine. User is registered in the back end. I get the email with the url I need to click on to confirm the user.

      I click on the URL and the user is now marked as Active in back end.

      However I cannot login! The password used to sign up does NOT work!

      Grrrrr!
        • 23510
        • 168 Posts
        Using 2.1.5

        Here is the code:

        [[!Register?
           &submitVar=`register-submit`
           &activationEmailTpl=`register.emailTpl`
           &activationEmailSubject=`Please confirm your e-mail address`
           &activationResourceId=`56`
           &submittedResourceId=`57`
           &usergroups=`Registeredusers`
           &activationttl=`1440`
           &usernameField=`email`
           &passwordField=`passwordL`
           &postHooks=`hook.emailNotify`
        &validate=`workemail:blank,
        fullname:required,
        email:required:email,
        passwordL:required:minLength=^8^,
        password_confirm:password_confirm=^passwordL^`
        ]]
        
        
        [[!+error.message:notempty=`<div class="registerMessage">[[+error.message]]</div>`]]
        
        <p>All fields are required</p>
        <form action="[[~[[*id]]]]" method="post" class="form" id="registrationForm">
          <fieldset>
        <input type="hidden" name="workemail" value="" />
        
        
            <label for="fullname"><span class="label">Your full name:</span>
        <span class="input"><input name="fullname" id="fullname"  type="text" value="[[+fullname]]" />
          [[!+error.fullname]]
        </span></label>
        
            <label for="email"><span class="label">Your E-mail:</span>
        <span class="input"><input name="email" id="email"  type="text" value="[[+email]]" />
          [[!+error.email]]
        </span></label>
        
            <label for="passwordL"><span class="label">Password:</span>
        <span class="input"><input name="passwordL" id="passwordL"  type="password" value="[[+passwordL]]" />
        [[!+error.passwordL]]
        </span></label>
        
            <label for="password_confirm"><span class="label">Confirm Password:</span>
        <span class="input"><input name="password_confirm" id="password_confirm" type="password" value="[[+password_confirm]]" />
        [[!+error.password_confirm]]
        </span></label>
        
            <span class="submitButtons"><input type="submit" name="register-submit" value="Register" /></span>
          </fieldset>
        </form>
        
        
        
          • 3749
          • 24,544 Posts
          Does the password contain anything other then letters and numbers? There was a problem with passwords containing punctuation. Login is supposed to disallow that, but maybe it doesn't catch everything.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 23510
            • 168 Posts
            Nope, the passwords I tried were testing123 and fde5673dGW and they didn't work. However, manually changing the user's password in the admin worked.

            I upgraded the site to 2.2 but that has not gone smooth so I am looking to go back to 2.1.5 and find some workaround. Maybe have the password generated randomly or use a custom validator.

            My question though is how come I have not seen a mention of this bug in bugs.modx.com? Or even on this forum?
              • 23510
              • 168 Posts
              I currently have 2.2 (nightly of Dec 15) installed. It was initially doing the same thing but I got it fixed.

              I had the password field named 'passwordL' as I didn't want it to conflict with the password field in the login box at the top of all the site's pages. I changed this back to password but left the ID as passwordL. This has worked, however, it also means that the &passwordField=`passwordL` did not work or help. I should be able to rename the fields as I need to, correct?

              Thanks
              John