Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to re-send account creation emails. #2585

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

teymour-aldridge
Copy link
Contributor

Submitting the "invite user" form a second time will now send a new email.

Fixes #2582

Submitting the "invite user" form a second time will now send a new email.
tabbycat/users/forms.py Outdated Show resolved Hide resolved
Co-authored-by: Étienne Beaulé <[email protected]>
@teymour-aldridge
Copy link
Contributor Author

teymour-aldridge commented Jan 28, 2025

For

     if created:
        user.membership_set.create(group=self.cleaned_data['role'])

This might cause some confusion if a user is invited once with some role, but the follow-up email is sent with a different role (as the second role will be ignored). However, I think this is more reasonable than changing the user's role here (this should be done separately if necessary)?

@tienne-B
Copy link
Member

tienne-B commented Feb 2, 2025

@teymour-aldridge That is a good point! A user can have many groups, and different groups between tournaments, so that new user check is problematic.

Have you tried using the .add() method instead of .create()?

I think it'd look something like this:

user.membership_set.add(self.cleaned_data['role'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability to re-send account creation invitation emails
2 participants