mirror of
https://github.com/ae-utbm/sith.git
synced 2026-10-31 06:39:31 +00:00
Send an email when creating an account via POST /register
This commit is contained in:
1 parent
72cf5a3d5e
commit
e15bcfae07
7 files changed
+846
-764
No files matched your search
@@ -194,14 +194,6 @@ class RegisteringForm(UserCreationForm):
|
||||
model = User
|
||||
fields = ("first_name", "last_name", "email")
|
||||
|
||||
def save(self, *, commit=True):
|
||||
user = super().save(commit=False)
|
||||
user.set_password(self.cleaned_data["password1"])
|
||||
user.generate_username()
|
||||
if commit:
|
||||
user.save()
|
||||
return user
|
||||
|
||||
|
||||
class UserProfileForm(forms.ModelForm):
|
||||
"""
|
||||
|
||||
Reference in new issue
Block a user