开发者

use drupal login for two websites one with drupal and another with php

I have an two websites one is drupal and another is php based i need to restrict the content of the php website before logged in . once the user is logged in the drupal website the php website should also use the user coming from the drupal website.is that possible to do that? how to get the user is logged in in external website.

updated Solution for this .. use this script to access the drupal users out of it

<?php
chdir('/var/www/');/*This should be the drupal base directory.This is more important.*/
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); 
global $user;
if($user->uid)
{
   echo "You are logged in ..";
}
el开发者_StackOverflow中文版se
{
echo "you are not logged in ";
}


You will need to write a module in Drupal, and one in the other application, to manage this.

I am actually currently working on such a project.

Here is a good D7 tutorial

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜