Exemplo n.º 1
0
 public function addRemoteIdentity($provider, $identifier)
 {
     if ($this->_id === null) {
         return false;
     }
     $model = new UserRemoteIdentity();
     $model->setAttributes(array('user_id' => $this->_id, 'provider' => $provider, 'identifier' => $identifier));
     return $model->save();
 }
Exemplo n.º 2
0
 /**
  * @inheritdoc
  */
 public function hasRemoteIdentity($provider)
 {
     if ($this->_id === null) {
         return false;
     }
     return 0 != UserRemoteIdentity::model()->countByAttributes(array('provider' => $provider, 'user_id' => $this->_id));
 }
Exemplo n.º 3
0
 public function addRemoteIdentity($provider, $identifier)
 {
     $model = new UserRemoteIdentity();
     $model->setAttributes(['user_id' => $this->id, 'provider' => $provider, 'identifier' => $identifier], false);
     return $model->save();
 }