I have a web app which opens a PHP session and stores the user's username and password inside it, as well as first and last name, and e-mail address.
I am installing Drupal in a subdirectory on the same server, and I need to use this information to _automatically_ log in to Drupal the moment they visit a page on Drupal. It is important that they not have to enter the username and password themselves.
I've written and successfully tested a PHP script already:
session_start();
$crazyuserobject = $HTTP_SESSION_VARS["user"];
$uservars = get_object_vars($crazyuserobject);
print('<br>USER: ' . $uservars['Username'] );
print('<br>PASS: ' . $uservars['Password'] );
print('<br>FNAM: ' . $uservars['FirstName'] );
print('<br>LNAM: ' . $uservars['LastName'] );
print('<br>MAIL: ' . $uservars['Email'] );
...that retrieves the variables I need, to verify that it can be done. What I want to do is, if that Drupal user exists, log in to it instantly. (If not existing, *maybe* create the account AND login. But that's not the important part.)