protected function createProfileFromAdapterProfile($adapter_profile, $user)
	{
		$ProfileModel = $this->config['db']['profilemodel'];
		$attributes['provider'] = $this->provider;

		// @todo use config value for foreign key name
		$attributes['user_id'] = $user->id;

		$profile = new $ProfileModel($attributes);
		$profile = $this->applyAdapterProfileToExistingProfile($adapter_profile, $profile);

		return $profile;
	}
protected function createProfileFromAdapterProfile($adapter_profile, $user)
	{
		$ProfileModel = $this->config['db']['profilemodel'];
		$attributes['provider'] = $this->provider;

		// @todo use config value for foreign key name
		$attributes['user_id'] = $user->id;

		$profile = new $ProfileModel($attributes);
		$profile = $this->applyAdapterProfileToExistingProfile($adapter_profile, $profile);

		return $profile;
	}
protected function createProfileFromAdapterProfile ( $ adapter_profile , $ user ) { $ ProfileModel = $ this -> config [ 'db' ] [ 'profilemodel' ] ; $ attributes [ 'provider' ] = $ this -> provider ; // @todo use config value for foreign key name $ attributes [ 'user_id' ] = $ user -> id ; $ profile = new $ ProfileModel ( $ attributes ) ; $ profile = $ this -> applyAdapterProfileToExistingProfile ( $ adapter_profile , $ profile ) ; return $ profile ; }
Creates a social profile from a HybridAuth adapter profile

@param \Hybrid_User_Profile	$adapter_profile
@param User					$user

@return Profile
Creates a social profile from a HybridAuth adapter profile