REG: email is not cced to user. only to PIs
[myslice.git] / portal / registrationview.py
index 9cc0cc3..26f9e67 100644 (file)
@@ -46,7 +46,8 @@ class RegistrationView (FreeAccessView):
             print "FIREXP ENABLED"
 
         authorities = execute_admin_query(request, authorities_query)
-        authorities = sorted(authorities)
+        if authorities is not None:
+            authorities = sorted(authorities)
         # xxx tocheck - if authorities is empty, it's no use anyway
         # (users won't be able to validate the form anyway)
 
@@ -168,12 +169,13 @@ class RegistrationView (FreeAccessView):
                     'email'         : reg_email,
                     'user_hrn'      : user_hrn,
                     'public_key'    : public_key,
-                    'cc_myself'     : True # form.cleaned_data['cc_myself']
                     }
                 recipients = authority_get_pi_emails(request,reg_auth)
-
-                if ctx['cc_myself']:
-                    recipients.append(ctx['email'])
+                
+                # We don't need to send this email to user.
+                # it's for the PI only
+                #if ctx['cc_myself']:
+                #    recipients.append(ctx['email'])
 
                 msg = render_to_string('user_request_email.txt', ctx)
                 send_mail("Onelab New User request for %s submitted"%reg_email, msg, 'support@myslice.info', recipients)