ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


how to login to ATutor from a remote login form


  • 2008-01-22 09:29:26

    how to login to ATutor from a remote login form

    not related to the other cookie discussion.

    what I want to do is set a session cookie on my Atutor install on one domain with the login form from a different domain.

    here's my situation: I have created a login form at www.example.com that directs to my Atutor install at www2.example.com - when I use it I am redirected, but get the "session cookies must be enabled" message..

    if I go back and try again it works, as the cookie is set the first time.

    but how do I set the cookie on the www2 domain from the www domain? anyone has any experience with this?

  • 2008-01-22 10:20:23

    Re: how to login to ATutor from a remote login form..?

    You can comment out the cookie check in login.php at about line 59, then make the following "else if" into an "if" statement.

    These lines are intended to stop remote login.

  • 2008-01-23 09:00:07

    Re: how to login to ATutor from a remote login form..?

    thanks!

    haven't done it yet as I came to think of the JS to encrypt passwords, which I probably would have to transfer in some way to the remote site as well.. you know if that would be complicated?

  • 2008-01-23 09:07:08

    Re: how to login to ATutor from a remote login form..?

    Its fairly straight forward. Have a look at the default theme login template. Everything you need you should be able to cut and paste from there.

  • 2008-01-24 06:30:33

    Re: how to login to ATutor from a remote login form..?

    cool, I will experiment some more with it!

    the reason I ask is that there's included some PHP in the onclick attribute as of 1.6, namely this:

    <?php echo $_SESSION['token']; ?>

    ..within the return crypt_sha1() - and this session token would refer to Atutor, not Drupal where we need to include the code..?