We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12379
    • 460 Posts
    Thanks - I’ve put a "log-out" and "view profile" button in the box but now but now I’ve hit another snag. When I click "view profile" it takes me (randomly?) to page ID 15 when the profile home is spec’d as 30 - see below:

    [!WebLoginPE? &type=`simple` &loHomeId=`72` &regHomeId=`71` &profileHomeID=`30` &liHomeId=`30` &successTpl=`loginSuccessBox` &loginFormTpl=`loginForm`!]

    My template, "loginSuccessBox", looks like this:

    [+wlpe.message+]
    <div id="wlpeLoggedIn">
    <p>You’re currently logged in as [+user.username+]!</p>
    <p>Not you? Log-out below and then log back in again.
    </div>
    <form id="wlpeUserForm" action="[~[*id*]~]" method="POST">
    <fieldset id="wlpeUserButtons" >
    <input type="image" src="assets/templates/hpc/images/button_logout.gif" id="wlpeLogoutButton" name="service" value="logout" />
    <input type="image" src="assets/templates/hpc/images/button_profile.gif" id="wlpeProfileButton" name="service" value="profile" />
    </fieldset>
    </form>
    </div>

      Mostly harmless.
      • 27442
      • 103 Posts
      Look at danthach6’s post above.... it’s an error in the documentation. Your call should have &profileHomeId=`30`
        • 12379
        • 460 Posts
        OK thanks that’s done the trick.

        When I retrieve a password I receive an email with "To active you new password click the following link: http://mydomain.com.au/home&service=activate&userid=1&activationkey=Xz42zBkTK8"

        It goes to the front page of the web site. I would like to direct to another page for changing their password. How do I configure the url in the email?
          Mostly harmless.
          • 25847
          • 62 Posts
          I have a potential bug with my current installed version of webloginPE. This is for the website located at http://www.rockiereps.com. The currently installed version of webloginPE is 1.3.0. Here is my issue:

          If a user forgets their password and requests a new one, it emails them a temporary password. However: when they go back to the login page and attempt to log in with the new temporary password, it says that the password is incorrect. Here’s the interesting twist on this issue though... If I (or the client) logs into the MODx Manager and goes to the WebUser’s Tab under "Security", he has the option to reset the user’s password and email them a new temporary one manually. If he or I do this manually, the password they receive in this manually works perfectly and then they can change their own password.

          Does anyone have any idea what could possibly be causing this issue? Has anyone else experienced this problem?
            • 28033
            • 925 Posts
            Quote from: rhetorik at Nov 27, 2008, 12:32 AM

            I have a potential bug with my current installed version of webloginPE. This is for the website located at http://www.rockiereps.com. The currently installed version of webloginPE is 1.3.0. Here is my issue:

            If a user forgets their password and requests a new one, it emails them a temporary password. However: when they go back to the login page and attempt to log in with the new temporary password, it says that the password is incorrect. Here’s the interesting twist on this issue though... If I (or the client) logs into the MODx Manager and goes to the WebUser’s Tab under "Security", he has the option to reset the user’s password and email them a new temporary one manually. If he or I do this manually, the password they receive in this manually works perfectly and then they can change their own password.

            Does anyone have any idea what could possibly be causing this issue? Has anyone else experienced this problem?

            IIRC, wasn’t that one of the bugs we fixed in 1.3.1? One of the password fields or something not having the correct name?
              My Snippets
              -> PopUpChunk v1.0
              • 4310
              • 2,310 Posts
              Password reminder works okay for me in WLPE 1.3.1.
              Haven’t tried it in earlier versions though.
                • 16028
                • 15 Posts
                Ok, so I’m no php expert, nor am I a modx expert. Really more of a hack and brand new to Modx, although I’m learning relatively quickly.

                I have a problem, though, that I can’t find a solution to in the forums.

                I have a script that I’m submitting a form to, which is then passing the form data through the URL to a form hosted on ModX and using WEbLoginPE.

                I am having no trouble getting the data pulled from the URL and populated into the form on ModX.

                However, if this form is submitted with a missing field, and WebLoginPE reloads the page with the error message, some of the fields are not repopulating, while others are.

                I have a snippet that looks like:

                $affiliateid = $_GET['custom_affiliateid'];
                $affiliatefirst = $_GET['custom_affiliatefirst'];
                $affiliatelast = $_GET['custom_affiliatelast'];
                $affiliateurl = $_GET['custom_affiliateurl'];
                $affiliatezo = $_GET['custom_affiliatezo'];
                $affiliateurltext = $_GET['custom_affiliateurltext'];
                $affiliatedistributor = $_GET['custom_affiliatedistributor'];
                $affiliatebrand = $_GET['custom_affiliatebrand'];
                
                $first = $_GET['first_name'];
                $email = $_GET['email'];
                
                echo "<input type='hidden' id='wlpeRegisterAffiliateid' name='affiliateid' value='".$affiliateid."[+post.affiliateid+]' />
                			<input type='hidden' id='wlpeRegisterAffiliatefirst' name='affiliatefirst' value='".$affiliatefirst."[+post.affiliatefirst+]' />
                			<input type='hidden' id='wlpeRegisterAffiliatelast' name='affiliatelast' value='".$affiliatelast."[+post.affiliatelast+]' />
                			<input type='hidden' id='wlpeRegisterAffiliateurl' name='affiliateurl' value='".$affiliateurl."[+post.affiliateurl+]' />
                			<input type='hidden' id='wlpeRegisterAffiliateurltext' name='affiliateurltext' value='".$affiliateurltext."[+post.affiliateurltext+]' />
                			<input type='hidden' id='wlpeRegisterAffiliatezo' name='affiliatezo' value='".$affiliatezo."[+post.affiliatezo+]' />
                			<input type='hidden' id='wlpeRegisterAffiliatebrand' name='affiliatebrand' value='".$affiliatebrand."[+post.affiliatebrand+]' />
                			<input type='hidden' id='wlpeRegisterAffiliatedistributor' name='affiliatedistributor' value='".$affiliatedistributor."[+post.affiliatedistributor+]' />
                <p>To complete your registration for The Motor Oil Evaluator, you must complete your FULL name, confirm your email address, choose a username for your login and read over and agree to our Terms of Service and Privacy Policy.  In a nutshell, it just says that the information you gain from this
                site is provided AS IS, with no warranty in regards to its accuracy or its usefulness to you in make business or personal decisions regarding your oil selection. 
                
                <p>I may miss a tech spec update here or there or might incorrectly 
                enter a value occassionally, so let me know if I do.  Also, the information is only as useful as the decisions you make from its use.  I have no control over your oil selection decisions once you've compared the oils, AND, since you have the 
                ability to CHANGE the ranking of the oils based upon your own preferences, the actual information you receive from this service MAY differ considerably from what I have actually put forth in the default structure of the listings.
                
                <p>Also, the privacy policy basically just says I won't use your contact information for anything you don't already know about (news, updates, useful product reviews, etc.) and WILL NOT supply your contact information to ANY other business, organization or individual for ANY reason other than a legal mandate.
                
                		<fieldset id='wlpeRegisterFieldset' style='border: none;'>
                
                			<p class='wlpeRegisterInfo'>Enter your email address, your <b>FULL</b> name, and your desired username in the fields below.  A password will be emailed to you with instructions on how to activate Your account, <b>so, please make sure the email you enter is correct</b>.</p>
                			
                			<label for='wlpeRegisterFullName'><b>Your <i>FULL</i> Name</b><br>
                			<input type='text' id='wlpeRegisterFullName' name='fullname' value='".$first."[+post.fullname+]' />
                			</label>
                			<br>
                			<label for='wlpeRegisterEmail'><b>Your Email Address</b><br>
                			<input type='text' id='wlpeRegisterEmail' name='email' value='".$email."[+post.email+]' />
                			</label>
                			<br>
                
                			<label for='wlpeRegisterUserName'><b>Your desired username</b><br>
                			<input type='text' id='wlpeRegisterUserName' name='username' value='[+post.username+]' />
                			</label>


                When a user registers for an account on this Modx site using the form above, I want not only their information submitted to the database, but also the information related to the affiliate that referred them.

                This data is pulled from the URL as it has been passed on from a previous form submission.

                On the new form, all fields populate initially. However, if the user doesn’t fill out a field, like checking the TOS box, when the page reloads with the error message, all of the affiliate info fields have been blanked.

                The snippet I posted above is called by a chunk:

                [+wlpe.message+]
                
                <div id="wlpeRegister">
                	<form id="wlpeRegisterForm" name="wlpeRegisterForm" action="[~[*id*]~]" method="POST">
                
                [[PHPHeader]]
                
                
                		
                
                [+tos+]
                			<input type="checkbox" id="wlpeRegistertos" name="tos"  />  I agree to the terms of service
                
                		</fieldset><br><br>
                		<fieldset id="wlpeRegisterButtonFieldset" style='border: none;'>
                			<button type="submit" id="wlpeRegisterButton" name="service" value="register">Register</button>
                			<button type="submit" id="wlpeRegisterCancelButton" name="service" value="cancel">Cancel</button>
                		</fieldset>
                	</form>
                </div>


                And the chunk above is called using the following code in the document content area in Modx:

                [!WebLoginPE? &type=`register` &regType=`verify` &registerTpl=`UserRegister` &customFields=`affiliateid,affiliatefirst,affiliatelast,affiliateurl,affiliateurltext,affiliatezo,affiliatebrand,affiliatedistributor` &pruneDays=`7` &groups=`Registered Users` &tableCheck=`0` &regRequired=`email,username,fullname,tos`!]



                On error, when the page reloads, the query strings are cleared from the URL, so they will not repopulate in that manner, which is why I’ve used the "post" placeholders to reinsert that data on error.

                What am I doing wrong? Any help would be greatly appreciated as I’ve spent about a 1/2 hour searching the forums for an answer with no success.

                Does it have something to do with the fact that they are hidden fields? Not sure why that would matter, but it’s the only difference I can see between the fields that ARE repopulating the data and those that are NOT.

                Thanks again.
                  • 31471
                  • 206 Posts
                  Try like this:
                  [tt]$affiliateid = $_POST[’custom_affiliateid’];[/tt]
                  Hidden fields (and the other form fields) aren’t going through the url but with the http data.
                  If you need to collect data both from get and post, try this:
                  [tt]$affiliateid = $_REQUEST[’custom_affiliateid’];[/tt]
                    • 5070
                    • 36 Posts
                    Can not redirect or display message after successfully registering for new account. I have tried with registerSuccessTpl, &regSuccessId but all of them return a blank page.
                    can you give me some suggestions?
                      • 16028
                      • 15 Posts
                      vhollo,

                      Thanks for the response, but I’m not sure you’re understanding the problem correctly.

                      The INITIAL form that is being filled out is not within my MODx setup. It’s a separate form that submits to a script. this script has the ability to pass on the data to another script.

                      Currently, I have the data being passed to this registration page on Modx. The data is being passed fine and is being retrieved and inserted within the form without trouble. that’s not the issue.

                      The issue is, if someone submits THAT form incorrectly (ie. does not fill in one of the fields) and WebLoginPE returns the user to that same page, the WebLoginPE placeholders that I’ve inserted for each of those values are not returning the data to the form fields.

                      BTW - I think I HAVE been able to ascertain that at least part of my problem lies in the fact that these are hidden fields. When I changed one of them to a text field, then the placeholder worked and the information was reinput into that field when the page reloaded with the error message.