Auto Enroll - Membership 2 & Coursepress

Hi,

I have been following a few support tickets on auto enrolment to a course after becoming a member through membership 2

I have used this code at the bottom of the coursepress theme - https://premium.wpmudev.org/forums/topic/coursepress-auto-register-user#post-768674 - although after a new member joins they are still not automatically enrolled. 'You are not enrolled on any courses'

Any ideas>