Recommended Shortcode Update to Affiliate Plugin

I needed to add a new shortcode to the Affiliate plugin where I could just output the referral URL, so I wrote this. Hopefully it's useful for someone else.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
In: plugins/affiliate/affiliateincludes/classes/affiliateshortcodes.php
Find: function initialise() {
Around line: 66
Add this after that line:
add_shortcode('affiliatelink', array(&$this, 'do_affiliatelink_shortcode') );

Find: function do_affiliatelogincheck_shortcode($atts, $content = null, $code = "") {
Around line: 121
Add this before that line:

//Add affiliate link shortcode function
	function do_affiliatelink_shortcode() {

		$user = wp_get_current_user();
		$user_ID = $user->ID;

		if(empty($user_ID)) {
			return '';
		}

		$reference = get_user_meta($user_ID, 'affiliate_reference', true);
		$siteurl = aff_get_option('home');
		$affiliatelink = $siteurl.sprintf('/?ref=%s', $reference);

		return $affiliatelink;
	}

Usage:
[affiliatelink]