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

    I have just started using MODx, and I have a couple of small questions. I am using version 0.9.6.1.

    1. Change Password / Forgotten Password
    I have followed the tutorial given here on how to implement a change password form, although the version I am using does not appear to have the relevant code to edit as shown in the WebLoginTpl chunk on this page.
    I have the form on the page, although it does not process a new password. When I click Submit, the form simply clears and does not show a new password to return to the home page, and thus does also not change the password!

    A related issue is the Forgotten Password link. I can login fine, but when I try to have a password reminder sent, it does not send an e-mail.

    2. Display Web Member on home page
    Part of the site I am creating has a "member area" for the web members. Is there a way I can get the member’s name displayed as a title, such as "Welcome, Joe Bloggs!"?

    B Hazel
      • 4310
      • 2,310 Posts
      Point 2 you could put this into a snippet :
      <?php
      $output ="";
      if(isset($_SESSION['webValidated']) && isset($_SESSION['webFullname'])){
      $lastvisit = $_SESSION['webLastlogin'];
      if($lastvisit !=""){
      $output .= 'Welcome back ';
      $output .=$_SESSION['webFullname'];
      }
      else{
      $output .='Welcome ';
      $output .=$_SESSION['webFullname'];
      }
      }
      return $output;
      ?>

      Name the snippet UserName and call it on your page:
      [[UserName]]

      It will show either Welcome back Full Name or Welcome Full Name, where Full Name is the name of your user, depending on whether they’ve logged in before.
        • 4386
        • 5 Posts
        That’s brilliant! Thank you very much!