We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 15211
    • 2 Posts
    I’ve been searching around here for info on this bu t haven’t found any. Could someone please enlighten me as to what they are using to handle user login/logout? I don’t see any way that user’s can log out, not to mention the snippet breaks if you edit any of the chunk code. I’m sure I can’t be the only one having this issue, since this is the 4th or so site I’ve worked on that was using modx that had a malfunctioning login system for web users.

    So is there something else I should be using to handle user logins?
      • 25663 MODX Staff
      • 12,272 Posts
      Please provide more info ("help us help you" in my signature). Are you calling the snippet [!uncached!]?
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 15211
        • 2 Posts
        Yes, I’m calling it uncached. It doesn’t seem to work on any browser on my OS (win2000pro)

        here’s the chunk code. basically it stopped working after I added the list to seperate the items, and I’m sure it’s because of the javascript snippet that uses doclayers for some reason. But oddly, the snippet doesn’t appear anymore after you login and return to the login page.

        <!-- login form section-->
        <form method="post" id="loginfrm" action="[+action+]"> 
            <input type="hidden" value="[+rememberme+]" name="rememberme" /> 
            <fieldset>
                <h3>Your Login Details</h3>
              <ol>
               <li>
                <label for="username">User: </label><input type="text" name="username" id="username" tabindex="1" onkeypress="return webLoginEnter(document.loginfrm.password);" value="[+username+]" />
             </li><li>
            	<label for="password">Password: </label><input type="password" name="password" id="password" tabindex="2" onkeypress="return webLoginEnter(document.loginfrm.cmdweblogin);" value="" />
        <a href="#" onclick="webLoginShowForm(2);return false;" id="forgotpsswd">Forget Your Password?</a>
             </li><li>
            	<input type="checkbox" id="checkbox_1" name="checkbox_1" tabindex="3" size="1" value="" [+checkbox+] onclick="webLoginCheckRemember()" /><label for="checkbox_1" class="checkbox">Remember me</label>
            </li><li>
            	<input type="submit" value="[+logintext+]" name="cmdweblogin" class="button" />
            </li>
        </ol>
        	
        	</fieldset>
        </form>
        
        <!-- log out hyperlink section -->
        <p id="logout">
        <h4>You're already logged in</h4>
        Do you wish to <a href="[+action+]" class="button">logout</a>?
        </p>
        
        <!-- Password reminder form section -->
        <form id="loginreminder" method="post" action="[+action+]">
            <fieldset>
                
        <ol>
        <li><h3>Forget your password? It happens to everyone...</h3>
                <input type="hidden" name="txtpwdrem" value="0" />
        <p>Enter the email address of your account to reset your password:</p>
                <label for="txtwebemail">Email:</label><input type="text" name="txtwebemail" id="txtwebemail" size="24" />
        </li><li>
                <label>To return to the login form, press the cancel button.</label>
            	<input type="submit" value="Submit" name="cmdweblogin" class="button" /> <input type="reset" value="Cancel" name="cmdcancel" onclick="webLoginShowForm(1);" class="button" style="clear:none;display:inline" />
        </li>
        </ol>
            </fieldset>
        </form>
        


        Is there any documentation available for the snippet? I haven’t been able to find any info on it.