From a7c93f79d9aea586895221b73dd5fd18309354c2 Mon Sep 17 00:00:00 2001
From: Loic Baron <loic.baron@lip6.fr>
Date: Thu, 24 Jul 2014 06:56:42 -0300
Subject: [PATCH] Registration: for Fibre using username corresponding to LDAP

---
 portal/registrationview.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/portal/registrationview.py b/portal/registrationview.py
index cf857256..c6dbd2a9 100644
--- a/portal/registrationview.py
+++ b/portal/registrationview.py
@@ -39,7 +39,7 @@ class RegistrationView (FreeAccessView, ThemeView):
         """
         """
         errors = []
-
+        authority_hrn = None
         authorities_query = Query.get('authority').select('name','authority_hrn')
         authorities = execute_admin_query(wsgi_request, authorities_query)
         if authorities is not None:
@@ -67,8 +67,8 @@ class RegistrationView (FreeAccessView, ThemeView):
                     authority_hrn = authority['authority_hrn']     
 
             # Handle the case when the template uses only hrn and not name
-            #if not authority_hrn:
-            authority_hrn = wsgi_request.POST.get('org_name', '')
+            if authority_hrn is None:
+                authority_hrn = wsgi_request.POST.get('org_name', '')
 
             post_email = wsgi_request.POST.get('email','').lower()
             salt = randint(1,100000)
-- 
2.47.0