Search code examples
pythondjangoauthenticationdjango-registration

Selective user registration using django_registration?


I have a site catering to multiple clubs, and each club has administrators who maintain a database of club members. I want to limit site registration only to members who have explicitly been added to the club's database. How do I go about auto-generating and sending out registration links to members as they are added to the database? In other words, I want registration to be initiated only by club administrators.


Solution

  • To limit registrations to people already in the database, you will need some way to identify them.

    1. Require the club administrator to enter an email address for each member entered.
    2. Require the user to supply that address when registering.
    3. Send the registration link to that address, including the primary key of the user record in the link.
    4. When the user clicks the link, in your django view examine the link and make sure the key matches, then complete the registration.