Create util method to check if email is empty
- Create method to check if email is empty or the default AuthMe email (avoids repetition) - Check that input email has '@' inside text (relates to #1105)
This commit is contained in:
@@ -88,4 +88,14 @@ public final class Utils {
|
||||
return Runtime.getRuntime().availableProcessors();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the given email is empty or equal to the standard "undefined" email address.
|
||||
*
|
||||
* @param email the email to check
|
||||
*
|
||||
* @return true if the email is empty
|
||||
*/
|
||||
public static boolean isEmailEmpty(String email) {
|
||||
return StringUtils.isEmpty(email) || "your@email.com".equalsIgnoreCase(email);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user