Login to Yii application from another application (phpBB)


I am integration Yii application with phpBB forum. I have created an auth for my custom login so that I can log users to Yii application with they login to forum. I have implemented the login functionality in Yii application as well. Can some one guide me how do I login users from phpBB to Yii application. These two application are on same domain.


You should have a UserIdentity class in your project:


 * UserIdentity represents the data needed to identity a user.

 * It contains the authentication method that checks if the provided

 * data can identity the user.


class UserIdentity extends CUserIdentity




	private $_id;


 	* Authenticates a user.

 	* @return boolean whether authentication succeeds.


	public function authenticate($md5=true)





    	else if((($md5)?md5($this->password):$this->password)!==$user->password)


    	else if($user->confirmRegistration)








    	return !$this->errorCode;


Do what you need to do in the ‘authenticate’ function. :)

Thank for the reply jacmoe :)

Are your suggesting that in another application (phpBB) I can do some thing like

$identity = new UserIdentity ();

$identity->username = "test";

$identity->password = "test";


and this will login the user to my Yii application as well?

You want to integrate external application in your Yii project.

You need to check out the cookies and Session values that are set when user logged in PHPBB.

then you should use your code.