示例#1
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getFacebook()
 {
     return $this->hasOne(RedSocialAuth::className(), ['usuario_id' => 'idusuario']);
 }
示例#2
0
 /**
  * Guarda información del perfil
  * @param $userId
  * @return bool
  */
 private function guardarPerfilFacebook($userId)
 {
     $rs = new RedSocialAuth();
     $rs->redsocial = $this->red_social;
     $rs->usuario_id = $userId;
     $rs->redsocial_id = $this->perfil_id;
     $rs->url = $this->url_perfil;
     $rs->localidad = $this->localidad;
     $rs->estado = $this->estado;
     $rs->access_token = $this->access_token;
     return $rs->save();
 }