summaryrefslogtreecommitdiff
path: root/src/utils/stringfilter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/stringfilter.cpp')
-rw-r--r--src/utils/stringfilter.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/utils/stringfilter.cpp b/src/utils/stringfilter.cpp
index 93be8b3e..1e2eaa54 100644
--- a/src/utils/stringfilter.cpp
+++ b/src/utils/stringfilter.cpp
@@ -103,9 +103,11 @@ bool StringFilter::filterContent(const std::string& text)
bool StringFilter::isEmailValid(const std::string& email)
{
- // Testing Email validity
- if ((email.length() < Configuration::getValue("account_minEmailLength", 7)) ||
- (email.length() > Configuration::getValue("account_maxEmailLength", 128)))
+ unsigned int min = Configuration::getValue("account_minEmailLength", 7);
+ unsigned int max = Configuration::getValue("account_maxEmailLength", 128);
+
+ // Testing email validity
+ if (email.length() < min || email.length() > max)
{
return false;
}