From 3dc0ba27e10459bcd321778b1ab4825d6bba3d37 Mon Sep 17 00:00:00 2001
From: James Graham <J.Graham@software.ac.uk>
Date: Thu, 28 Feb 2019 09:14:33 +0000
Subject: [PATCH] Modify email sent when user creates account #65

---
 profiles/social_auth.py | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/profiles/social_auth.py b/profiles/social_auth.py
index bde0c5e..453f75f 100644
--- a/profiles/social_auth.py
+++ b/profiles/social_auth.py
@@ -34,5 +34,12 @@ def email_admins(strategy, details, backend, user=None, *args, **kwargs):
     if kwargs['is_new']:
         mail_admins(
             subject='PEDASI Account Created',
-            message='Account created: {0}'.format(user.username)
+            message=(
+                'New PEDASI user account: {0}\n\n'
+                'A new user account has been created by {1} - {2} and requires admin approval'
+            ).format(
+                user.username,
+                user.get_full_name(),
+                user.email
+            )
         )
-- 
GitLab