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

    Is it possible to dynamically link to a users ’Login Home Page’ from a standard hyperlink (ie not putting in the doc id)?

    I have several private client pages which the user is directed to on login but if they navigate away from these pages they can only get back by typing the url or loging out and back in. If I used member check I’d have to manually add groups and links each time a new user group is added.

    If it was possible I could just add the link on the logout section of the weblogin so it would be hidden until signed in.

    Any ideas?
      • 4041
      • 788 Posts
      If you are referring to Web Users, try this:

      make a new snippet or incorporate this into one of your own -

      <?php
      if(isset($_SESSION['webValidated'])
      && isset($_SESSION['webShortname'])
      && isset($_SESSION['webUsrConfigSet']['login_home'])){
      
      $loginpageid = $_SESSION['webUsrConfigSet']['login_home'];
      $output ="";
      //$output .= $_SESSION['webUsrConfigSet']['login_home'];
      $output .="<a href='[~".$loginpageid."~]' title='' class='permalink'>My Home Page</a>";
      
      return $output;
      }
      ?>


      you could remove the 2nd line ( && isset($_SESSION[’webShortname’]) ) but leave the first and third for sure... that way if they arent logged in and they don’t have a login page set it will show nothing.
        xforum
        http://frsbuilders.net (under construction) forum for evolution
        • 28788
        • 79 Posts
        Breezer I have to say thank you very much for that reply, I was expecting something a little more cryptic wink

        That works perfectly it’s just what I was after.