Commit 2d81bfab5df5a407498e844174d904b548a3810f
1 parent
563988a5
Exists in
dev
adding email to admin for user registration
Showing
1 changed file
with
9 additions
and
1 deletions
Show diff stats
src/core/pyros_django/user_manager/forms.py
... | ... | @@ -61,7 +61,7 @@ class PyrosUserCreationForm(forms.ModelForm): |
61 | 61 | pyros_user.first_name = self.cleaned_data['first_name'] |
62 | 62 | pyros_user.last_name = self.cleaned_data['last_name'] |
63 | 63 | pyros_user.save() |
64 | - | |
64 | + # sending mail to new user | |
65 | 65 | send_mail( |
66 | 66 | '[COLIBRI CC] Registration', |
67 | 67 | 'Hi,\n\nThanks for your registration. The PI will examinate your account as soon as possible.\n\nCordialy,\n\nColibri Control Center', |
... | ... | @@ -69,4 +69,12 @@ class PyrosUserCreationForm(forms.ModelForm): |
69 | 69 | [self.cleaned_data['email']], |
70 | 70 | fail_silently=False, |
71 | 71 | ) |
72 | + # sending mail to admin (TODO: change mail adress) | |
73 | + send_mail( | |
74 | + '[PyROS CC] New registration', | |
75 | + f"Hi,\n\nA new user : {self.cleaned_data['email']}, need a validation for his registration", | |
76 | + '', | |
77 | + ["akoralewski@irap.omp.eu"], | |
78 | + fail_silently=False, | |
79 | + ) | |
72 | 80 | return pyros_user | ... | ... |