you can try one of these extensions:
Now you can control who registers on your site. This plugin and module
allows you to control or restrict user registration to only those
people who have received a "passphrase". This is useful for clubs,
organizations, churches, schools, etc that want to limit registration
to current and new members who have received the passphrase via email,
newsletter, etc. The correct passphrase must be entered before a user
can submit their registration.
InviteX- The most comprehensive Invitations system with native api contacts import, automated invitations, intelligent invites, rich
invites content, tracking, points integration & much much more.