alternative to emailaddress-remote
This commit is contained in:
parent
323d61adcb
commit
b287b69bf1
@ -108,10 +108,32 @@ public class EMailRemote extends AbstractRemote {
|
||||
|
||||
@Override
|
||||
protected void regularizeKeys(Map<String, String> whereParams) {
|
||||
if (whereParams.containsKey("name")) {
|
||||
String name = whereParams.get("name");
|
||||
String domain = null;
|
||||
String fulldomain = null;
|
||||
String subdomain = null;
|
||||
String localpart = null;
|
||||
String[] nameParts = name.split("@");
|
||||
if (nameParts.length == 2) {
|
||||
localpart = nameParts[0];
|
||||
fulldomain = nameParts[1];
|
||||
String[] fulldomainParts = fulldomain.split("\\:");
|
||||
if (fulldomainParts.length == 2) {
|
||||
subdomain = fulldomainParts[0];
|
||||
domain = fulldomainParts[1];
|
||||
} else {
|
||||
domain = fulldomain;
|
||||
}
|
||||
}
|
||||
whereParams.remove("name");
|
||||
if (localpart != null) whereParams.put("localpart", localpart);
|
||||
if (subdomain != null) whereParams.put("subdomain", subdomain);
|
||||
if (domain != null) whereParams.put("domain", domain);
|
||||
}
|
||||
replaceKey(whereParams, "domain", "domain.name");
|
||||
replaceKey(whereParams, "pac", "domain.user.pac.name");
|
||||
replaceKey(whereParams, "admin", "domain.user.name");
|
||||
whereParams.remove("name");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user