Hi all,

just as a reference to better understand what I meant, this already had
been reported:
http://dspace.2283337.n4.nabble.com/DSpace-LDAP-authentication-problem-td4665853.html#a4668861

Attached is a patch to solve this issue.

Best regards,
Daniel



-- 
Daniel Scharon
KIM, Room B 705
University of Konstanz
78457 Konstanz, Germany

Tel: +49 7531 88-2951
XMPP/E-Mail: daniel.scha...@uni-konstanz.de
Web: http://www.kim.uni-konstanz.de
--- a/dspace-api/src/main/java/org/dspace/authenticate/LDAPAuthentication.java	Fri Mar 28 17:05:18 2014 +0100
+++ b/dspace-api/src/main/java/org/dspace/authenticate/LDAPAuthentication.java	Fri Mar 28 17:12:24 2014 +0100
@@ -253,14 +253,16 @@
                 // If there is no email and the email domain is set, add it to the netid
                 String email = ldap.ldapEmail;
 
-                if ((StringUtils.isEmpty(email)) &&
-                        (StringUtils.isNotEmpty(ConfigurationManager.getProperty("authentication-ldap", "netid_email_domain"))))
+                if (StringUtils.isEmpty(email))
                 {
-                    email = netid + ConfigurationManager.getProperty("authentication-ldap", "netid_email_domain");
-                }
-                else
-                {
-                    email = netid;
+                    if((StringUtils.isNotEmpty(ConfigurationManager.getProperty("authentication-ldap", "netid_email_domain"))))
+                    {
+                        email = netid + ConfigurationManager.getProperty("authentication-ldap", "netid_email_domain");
+                    }
+                    else
+                    {
+                        email = netid;
+                    }
                 }
 
                 if (StringUtils.isNotEmpty(email))

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to