To use data from openID as a Yii login, you can change / overwrite the UserIdentity class (protected / components).
Overwrite existing authentication method. At this point, you can also set the current username Yii, for example:
$this->username=$openId->username
(where $openId->username should be replaced with a variable that contains the openID username)
By rewriting the side / login action, you can call your modified method, for example:
$identity=new UserIdentity("m","m");//where m is dummy if($identity->authenticate()) { Yii::app()->user->login($identity); [...] }
// Update (due to your comment): Not sure if I understand your problem correctly. But what about adding a new method to UserIdentity, like authenticateOID (). call this method at the beginning of the original authenticate () method, for example:
if ($this->authenticateOID) {} else {}
Inside authenticateOID() you check if OID authentication is being performed and / or if the user is still in your local "OID-user" table
source share