 
            if ($num_linked === 0 or \Config::get('opauth.link_multiple_providers') === true)
{
	// attach this account to the logged in user
	$this->link_provider(array(
		'parent_id'	=> $user_id,
		'provider' 	=> $this->get('auth.provider'),
		'uid' 		=> $this->get('auth.uid'),
		'access_token'	=> $this->get('credentials.token', null),
		'secret' 	=> $this->get('credentials.secret', null),
		'expires' 	=> $this->get('credentials.expires', null),
		'refresh_token'	=> $this->get('credentials.refresh_token', null),
		'created_at' 	=> time(),
	));
	// attachment went ok so we'll redirect
	return 'linked';
}
It looks like you're new here. If you want to get involved, click one of these buttons!