By rola_51 on
I have a non-Drupal application in which users are already logged in properly, and I want to redirect them on occasions to their Drupal account, without asking them to log-in again. Their Name and Pass fields in the Drupal users table match the ones on the non-Drupal application. Can anyone suggest a way to do this? Thanks!
Comments
Drupal api
There is a drupal api function called user_authenticate($name,$pass). It takes a userid / password and verifies if the database contains a user id and password, on successful match it returns the $user class. You should be able to use this function fairly easily. Look here for details http://api.drupal.org/api/function/user_authenticate/5.
Ali Hammad Raza
WordsValley
Some more details please
Found more on this subject at http://drupal.org/node/151515- Thanks.
I'm having an issue with
I'm having an issue with this. I use Drupal 6 and when use user_authenticate function it returns me the correct answer (uid, etc..) but it does not create the cookies. So, when i go to drupal site, the login is lost
http://localhost/drupal6/some.php and http://localhost/drupal6