Commit 4eea6ddb484393ddef268f6b28f49dd1a06da0da
1 parent
a2cac501
Exists in
dev
Modifying email message content to user when his account is approved, removing s…
…ending an email when account is deactivate or re-activate
Showing
1 changed file
with
8 additions
and
8 deletions
Show diff stats
src/core/pyros_django/dashboard/views.py
... | ... | @@ -443,14 +443,14 @@ def change_activate(request, pk): |
443 | 443 | text_object = "" |
444 | 444 | if (user.first_time == False and user.is_active == True): |
445 | 445 | user.first_time = True |
446 | - text_mail = "Hi,\n\nCongratulations, your registration has been approuved by the PI. Welcome to the Colibri Control Center.\n\nCordialy,\n\nColibri Control Center" | |
447 | - text_object = "[COLIBRI CC] Welcome" | |
448 | - elif (user.is_active == True): | |
449 | - text_mail = "Hi,\n\nYour account on the Colibri Control Center have been re-activated.\n\nCordialy,\n\nColibri Control Center" | |
450 | - text_object = "[COLIBRI CC] Re-activation" | |
451 | - else : | |
452 | - text_mail = "Hi,\n\nYour account on the Colibri Control Center have benn desactivated. Please contact the PI for futher information.\n\nCordialy,\n\nColibri Control Center" | |
453 | - text_object = "[COLIBRI CC] Desactivation" | |
446 | + text_mail = "Hi,\n\nCongratulations, your registration has been approved by the PI. Welcome to the PyROS Control Center.\n\nCordially,\n\nPyROS Control Center" | |
447 | + text_object = "[PyROS CC] Welcome" | |
448 | + # elif (user.is_active == True): | |
449 | + # text_mail = "Hi,\n\nYour account on the PyROS Control Center have been re-activated.\n\nCordially,\n\nPyROS Control Center" | |
450 | + # text_object = "[PyROS CC] Re-activation" | |
451 | + # else : | |
452 | + # text_mail = "Hi,\n\nYour account on the PyROS Control Center have benn desactivated. Please contact the PI for futher information.\n\nCordially,\n\nPyROS Control Center" | |
453 | + # text_object = "[PyROS CC] Desactivation" | |
454 | 454 | user.save() |
455 | 455 | send_mail(text_object, text_mail, '', [user.email], fail_silently=False,) |
456 | 456 | return redirect('user-detail', pk=pk) | ... | ... |