How to Auto-activate Affiliates on signup

Hello,

I am using Pro-Sites + Affiliates.

How can I auto-activate affiliates for new users that sign up?

I found a snippet here:
https://premium.wpmudev.org/forums/topic/auto-activate-affiliates-on-signup

But I don't know where to put that?