2 Replies Latest reply on Mar 6, 2008 12:54 PM by (Steve_Guluk)

    Auto login

      Hello,
      I put together a quick registration page form the Wizard, a login page also form the wizard and then a limit access event on the primary page.

      Works great and was so nice to save so much time over hand coding.

      But is there a means to check the session and if enabled automatically pass someone to the default page rather than then seeing the login page?

      This would be added to the login page so when they return they are immediately passed to the primary page.

      Or should I be doing a redirect from the primary to the login IF they so not have a session?

      That does make sense but am wondering about the intended or proper programming logic to achieve this goal.
        • 1. Re: Auto login
          Günter Schenk Level 4
          Hi Steve, <br /> <br />----- <br />But is there a means to check the session and if enabled automatically pass someone to the default page rather than then seeing the login page? <br />----- <br /> <br />try with adding a PHP redirection on line 1: <br /> <br /><?php<br />if (isset($_SESSION['kt_login_id'])) {<br />header('Location: http://www.example.com/path_to_default_page.php') ;<br />}<br />?> <br /> <br />----- <br />Or should I be doing a redirect from the primary to the login IF they so not have a session? <br />----- <br /> <br />That´s actually what´s the "Restrict Access To Page behaviour" does, among others -- if the session doesn´t exist, it will do just that. <br /> <br />Cheers, <br />Günter Schenk <br />Adobe Community Expert, Dreamweaver
          • 2. Re: Auto login
            Level 1
            They do not pay you enough Günter!

            I realized that the proper method is as you noted, to point to the primary page then allow it to redirect IF the session was not present.

            Thanks.

            Funny how sometimes the obvious presents it'self when you post to a forum and then realize "after" how obvious the answer was.