From f89ed77a9dde1c3b9934f11ab1e61670ea3ae390 Mon Sep 17 00:00:00 2001
From: Peter Hormanns <peter.hormanns@hostsharing.net>
Date: Sat, 21 May 2011 14:32:22 +0200
Subject: [PATCH] resolve #28

---
 hsarback/src/de/hsadmin/mods/email/EMailAddress.java |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hsarback/src/de/hsadmin/mods/email/EMailAddress.java b/hsarback/src/de/hsadmin/mods/email/EMailAddress.java
index 917568f..03bdeb9 100644
--- a/hsarback/src/de/hsadmin/mods/email/EMailAddress.java
+++ b/hsarback/src/de/hsadmin/mods/email/EMailAddress.java
@@ -77,7 +77,7 @@
 		}
 		String[] doms = parts[1].split("\\.");
 		StringBuilder query = new StringBuilder("obj.localpart='" + parts[0]
-				+ "' AND ( ( obj.subdomain IS NULL AND obj.domain.name='" + parts[1]
+				+ "' AND ( ( (obj.subdomain IS NULL OR obj.subdomain='') AND obj.domain.name='" + parts[1]
 				+ "' )");
 		for (int subdomLevel = 1; subdomLevel < doms.length - 1; ++subdomLevel) {
 			String subdom = "";

--
Gitblit v1.9.3