summaryrefslogtreecommitdiff
path: root/src/dalstorage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dalstorage.cpp')
-rw-r--r--src/dalstorage.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/dalstorage.cpp b/src/dalstorage.cpp
index c0359754..4b6ce81f 100644
--- a/src/dalstorage.cpp
+++ b/src/dalstorage.cpp
@@ -406,10 +406,11 @@ DALStorage::getEmailList()
}
/**
- * Tells if Email already exists.
+ * Return the number of same Emails in account's table.
*/
-bool
-DALStorage::doesEmailAlreadyExists(const std::string &email)
+
+unsigned int
+DALStorage::getSameEmailNumber(const std::string &email)
{
// If not opened already
open();
@@ -427,16 +428,9 @@ DALStorage::doesEmailAlreadyExists(const std::string &email)
}
std::stringstream ssStream(accountInfo(0,0));
- int iReturn = -1;
+ unsigned int iReturn = 0;
ssStream >> iReturn;
- if ( iReturn > 0 )
- {
- return true;
- }
- else
- {
- return false;
- }
+ return iReturn;
}
catch (const dal::DbSqlQueryExecFailure& e) {
// TODO: throw an exception.