With this module you can restrict user registration unless they have an Invitation Code.
You can generate as many codes as you like, by using the Add Single Invitation Code or Add Bulk Invitation Code. The number of times a code can be used is determined by the Repeat option, if set to 1 the code can only be used one time.