From 946b951080a95d7a4d7c2b1494f3e6f107906e7b Mon Sep 17 00:00:00 2001 From: Dario Date: Thu, 30 Jul 2020 15:35:04 +0200 Subject: [PATCH] update email log, use not longer html string --- src/cpp/SingletonManager/EmailManager.cpp | 4 ++-- src/cpp/model/table/User.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cpp/SingletonManager/EmailManager.cpp b/src/cpp/SingletonManager/EmailManager.cpp index 5760c8ee2..847887316 100644 --- a/src/cpp/SingletonManager/EmailManager.cpp +++ b/src/cpp/SingletonManager/EmailManager.cpp @@ -60,7 +60,7 @@ void EmailManager::addEmail(model::Email* email) { std::string log_message = "Email should be sended to: "; auto email_user = email->getUser(); if (email_user && email_user->getModel()) { - log_message += email_user->getModel()->getNameWithEmailHtml(); + log_message += email_user->getModel()->getNameWithEmail(); } else { log_message += ""; @@ -138,7 +138,7 @@ int EmailManager::ThreadFunction() std::string log_message = "Email sended to: "; auto email_user = email->getUser(); if (user_model) { - log_message += email_user->getModel()->getNameWithEmailHtml(); + log_message += email_user->getModel()->getNameWithEmail(); } else { log_message += ""; diff --git a/src/cpp/model/table/User.h b/src/cpp/model/table/User.h index 7f8e35c0a..50908b049 100644 --- a/src/cpp/model/table/User.h +++ b/src/cpp/model/table/User.h @@ -58,6 +58,7 @@ namespace model { inline const std::string getFirstName() const { std::shared_lock _lock(mSharedMutex); return mFirstName; } inline const std::string getLastName() const { std::shared_lock _lock(mSharedMutex); return mLastName; } inline std::string getNameWithEmailHtml() const { std::shared_lock _lock(mSharedMutex); return mFirstName + " " + mLastName + " <" + mEmail + ">"; } + inline std::string getNameWithEmail() const { std::shared_lock _lock(mSharedMutex); return mFirstName + " " + mLastName + "<" + mEmail + ">"; } inline const Poco::UInt64 getPasswordHashed() const { std::shared_lock _lock(mSharedMutex); return mPasswordHashed; } inline RoleType getRole() const { std::shared_lock _lock(mSharedMutex); if (mRole.isNull()) return ROLE_NONE; return static_cast(mRole.value()); } inline const unsigned char* getPublicKey() const { if (mPublicKey.isNull()) return nullptr; return mPublicKey.value().content().data(); }