I am newbie in yii framework. I want how to use external session in yii applications, I have a simple php session, in that php page add link to yii application . I want that php session will continued in yii application . I don’t know how can do it. Please any one can help me. sorry for my poor english…
see the CWebUser source code. when login, Yii set too session indexed by ‘__id’ and ‘__name’. So if you have set this two session, u can say you have done the yii login.
after the session is set, you try printing the value of Yii::app()->user->id or Yii::app()->user->name and see what happens. maybe you should also check the Yii::app()->user->isGuest().
/**
* @param mixed $value the unique identifier for the user. If null, it means the user is a guest.
*/
public function setId($value)
{
$this->setState('__id',$value);
}
/**
* Returns the unique identifier for the user (e.g. username).
* This is the unique identifier that is mainly used for display purpose.
* @return string the user name. If the user is not logged in, this will be {@link guestName}.
*/
public function getName()
{
if(($name=$this->getState('__name'))!==null)
return $name;
else
return $this->guestName;
}
i require to the external login authentication using php and redirect to welcome.php, that page i put link to yii application. when click the link, that login credentials are automatically login in yii application. i attached my php login file. thank you. sorry for my english,