简体   繁体   中英

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.

You said you have a database of club members already, so you must have a primary key or a tuple which is unique for that database like a club registration number which club members should know already

  1. Tell Users to give there primary key value( club registration number ) at the time of registration.
  2. Make that club registration number also as a primary key to the new database which you are creating after registration for the user, next time if some body will re-use that club registration number to re-register then It will fail as the database tuple will already be there associated with that club registration number
  3. Also have a warning message at the time of registration that you can use one club registration number for one registration only for the site.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM