We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7723
    • 2 Posts
    Hi there!
    I can’t get a User to login to do some editing. I am new at this undecided
    I used the snippet and chunk etc stated at http://rahul.rahul.net/modx-hints/modx-login-link.html
    I found that I could login, but it doesn’t do anything but to change the ’login’ to ’logout darren’. It does allow me to edit as an Editor? Then when I logout, it still show the ’logout darren’ link. Then when I try to login again after I refresh, it won’t let me login again.

    Cache in diabled and I have set the user and document groups and roles.
    Has anybody else had this problem?

    Regards,
    Darren
      • 7723
      • 2 Posts
      I worked out the Logout problem:
      The code:
      <?php
      # do the work
      $user = $modx->getLoginUserName();
      if ($user) {
      ---->>>> return ’<a href="[~10~]?webloginmode=lo">Logout ’ . $user . ’</a>’; <<<<----
      } else {
      return ’<a href="[~10~]">Login</a>’;
      }
      ?>

      I change the marked code line to:
      return ’<a href="[~10~]&webloginmode=lo">Logout ’ . $user . ’</a>’;

      I still don’t understand why the actual editor cannot edit.
      Regards,
      Darren