I have a global login page, this page check my login id and then redirect to my yii site. I don’t need to login again using yii login page

here is my global login variable


My question is, how to check my global login variable with my User database and redirect to my home page without second time login.

in the SiteController.php, I have this configuration

public function actionLogin()


	$form=new LoginForm;

	// collect user input data




		// validate user input and redirect to previous page if valid




	// display the login form


	$this->render('login', array('form'=>$form));


Not sure if i understand:

  • Your login page is a non-yii page?

  • Where does your global var come from and where do you store it persistently?

You are right. My login page is a non-yii page and the variable comes from pure php page. I can print the userlogin name on yii page, there is no problem. But I don’t want to login again( using yii login page). Is there any idea?