Added GuiRegister to allow users to create a new account on ReplayMod.com from the Mod itself

This commit is contained in:
CrushedPixel
2015-05-03 21:58:24 +02:00
parent 38ca7a0054
commit 5a3e3575c3
11 changed files with 327 additions and 27 deletions

View File

@@ -0,0 +1,17 @@
package eu.crushedpixel.replaymod.utils;
import java.net.URLEncoder;
public class EmailAddressUtils {
public static boolean isValidEmailAddress(String mail) {
try {
String[] spl1 = mail.split("@");
String[] spl2 = spl1[1].split("\\.");
String suffix = spl2[1];
return spl1[0].equals(URLEncoder.encode(spl1[0], "UTF-8")) && spl1[1].equals(URLEncoder.encode(spl1[1], "UTF-8"));
} catch(Exception e) {
return false;
}
}
}