We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22840
    • 1,572 Posts
    Hi,

    On my site running discuss, when some one registers they receive a email with a link to follow to login and validate their account, if they follow the link it doesn't actually let them log in and in the admin section there all set as "active = No"

    I tested it last night to see if they were just not activating their accounts but I couldn't log in with my test account.

    Is there a system setting that I've missed or is their something else I should be looking at ?

    Thanks

    This question has been answered by Alexus. See the first response.

      • 1041
      • 51 Posts
      May be it's `Login` issue? Could you show us your [[Register]], [[ConfirmRegister]] calls and the link that you receive in activation email? Also you should set `discuss.register_resource_id` system setting, but I don't think that it's the reason of issue.
        • 22840
        • 1,572 Posts
        Hi Alexus

        I have it set up as follows now.

        Register Page, id 267

        [[!Register?
        &submitVar=`registerbtn`
        &activationResourceId=`281`
        &activationEmailSubject=`Thanks for Registering!`
        &submittedResourceId=`282`
        &usergroups=`Members`
        &validate=`nospam:blank,
        username:required:minLength=^6^,
        password:required:minLength=^6^,
        password_confirm:password_confirm=^password^,
        fullname:required,
        email:required:email`
        &placeholderPrefix=`reg.`
        ]]

        <div class="register">
        <div class="registerMessage">[[!+reg.error.message]]</div>

        <form class="form" action="[[~[[*id]]]]" method="post">
        <input type="hidden" name="nospam" value="[[!+reg.nospam]]" />

        <label for="username">[[%register.username? &namespace=`login` &topic=`register`]]
        <span class="error">[[!+reg.error.username]]</span>
        </label>
        <input type="text" name="username" id="username" value="[[!+reg.username]]" />

        <label for="password">[[%register.password]]
        <span class="error">[[!+reg.error.password]]</span>
        </label>
        <input type="password" name="password" id="password" value="[[!+reg.password]]" />

        <label for="password_confirm">[[%register.password_confirm]]
        <span class="error">[[!+reg.error.password_confirm]]</span>
        </label>
        <input type="password" name="password_confirm" id="password_confirm" value="[[!+reg.password_confirm]]" />

        <label for="fullname">[[%register.fullname]]
        <span class="error">[[!+reg.error.fullname]]</span>
        </label>
        <input type="text" name="fullname" id="fullname" value="[[!+reg.fullname]]" />

        <label for="email">[[%register.email]]
        <span class="error">[[!+reg.error.email]]</span>
        </label>
        <input type="text" name="email" id="email" value="[[!+reg.email]]" />

        <br class="clear" />

        <div class="form-buttons">
        <input type="submit" name="registerbtn" value="Register" />
        </div>
        </form>
        </div>

        Confirm your account, id 282


        We have sent a email to the email address you provided, please click the link in the email to activate your account.

        Confirm your Registration, id 281

        [[!ConfirmRegister?
        &redirectTo=`265`
        ]]

        email address in validation email ( Returns a 404 not found )

        http://www.campsites-in-wales.co.uk/confirm-your-registration.html?lp=d20ycDVkNnE%253D&lu=cGF1bHAzMzMw

        Forum id is 265

        When I now register I get sent to the vsalidat page with the message and the email comes through, but that link then goes to a 404 page so the account is never activated, all pages are published.

        Thanks for having a look at this.

        Cheers
        • discuss.answer
          • 1041
          • 51 Posts
          Try to add &errorPage to your ConfirmRegister call. It should give you a custom error page (instead of 404), when you'll try to access http://www.campsites-in-wales.co.uk/confirm-your-registration.html directly or via broken link.
          [[!ConfirmRegister? 
             &redirectTo=`265` 
             &errorPage=`45`
          ]]

          Also try to add &activationttl like below:
          [[!Register? 
             ....
             &activationttl=`1440`
          ]]

          It is number of minutes until the activation email expires, by default 180 minutes - it may conflict with different servers time settings, but I do not sure.

          All rest of your code seems fine to me...
            • 22840
            • 1,572 Posts
            Excellent, that seems to have worked, thanks Alexus
              • 1041
              • 51 Posts
              Happy to hear that smiley You are welcome smiley