stephb9959
2023-09-06 08:13:48 -07:00
parent 2a8f09cb46
commit ab276bb474

View File

@@ -80,6 +80,7 @@ namespace OpenWifi {
continue; continue;
} }
DBG
switch (i.action) { switch (i.action) {
case OpenWifi::SecurityObjects::LinkActions::FORGOT_PASSWORD: { case OpenWifi::SecurityObjects::LinkActions::FORGOT_PASSWORD: {
DBG DBG
@@ -121,44 +122,61 @@ namespace OpenWifi {
} break; } break;
case OpenWifi::SecurityObjects::LinkActions::SUB_FORGOT_PASSWORD: { case OpenWifi::SecurityObjects::LinkActions::SUB_FORGOT_PASSWORD: {
DBG
auto Signup = Poco::StringTokenizer(UInfo.signingUp, ":"); auto Signup = Poco::StringTokenizer(UInfo.signingUp, ":");
DBG
if (AuthService()->SendEmailToSubUser(i.id, UInfo.email, if (AuthService()->SendEmailToSubUser(i.id, UInfo.email,
MessagingTemplates::SUB_FORGOT_PASSWORD, MessagingTemplates::SUB_FORGOT_PASSWORD,
Signup.count() == 1 ? "" : Signup[0])) { Signup.count() == 1 ? "" : Signup[0])) {
DBG
poco_information( poco_information(
Logger(), Logger(),
fmt::format("Send subscriber password reset link to {}", UInfo.email)); fmt::format("Send subscriber password reset link to {}", UInfo.email));
} }
DBG
StorageService()->ActionLinksDB().SentAction(i.id); StorageService()->ActionLinksDB().SentAction(i.id);
DBG
} break; } break;
case OpenWifi::SecurityObjects::LinkActions::SUB_VERIFY_EMAIL: { case OpenWifi::SecurityObjects::LinkActions::SUB_VERIFY_EMAIL: {
DBG
auto Signup = Poco::StringTokenizer(UInfo.signingUp, ":"); auto Signup = Poco::StringTokenizer(UInfo.signingUp, ":");
DBG
if (AuthService()->SendEmailToSubUser( if (AuthService()->SendEmailToSubUser(
i.id, UInfo.email, MessagingTemplates::SUB_EMAIL_VERIFICATION, i.id, UInfo.email, MessagingTemplates::SUB_EMAIL_VERIFICATION,
Signup.count() == 1 ? "" : Signup[0])) { Signup.count() == 1 ? "" : Signup[0])) {
DBG
poco_information( poco_information(
Logger(), fmt::format("Send subscriber email verification link to {}", Logger(), fmt::format("Send subscriber email verification link to {}",
UInfo.email)); UInfo.email));
} }
DBG
StorageService()->ActionLinksDB().SentAction(i.id); StorageService()->ActionLinksDB().SentAction(i.id);
DBG
} break; } break;
case OpenWifi::SecurityObjects::LinkActions::SUB_SIGNUP: { case OpenWifi::SecurityObjects::LinkActions::SUB_SIGNUP: {
DBG
auto Signup = Poco::StringTokenizer(UInfo.signingUp, ":"); auto Signup = Poco::StringTokenizer(UInfo.signingUp, ":");
DBG
if (AuthService()->SendEmailToSubUser( if (AuthService()->SendEmailToSubUser(
i.id, UInfo.email, MessagingTemplates::SUB_SIGNUP_VERIFICATION, i.id, UInfo.email, MessagingTemplates::SUB_SIGNUP_VERIFICATION,
Signup.count() == 1 ? "" : Signup[0])) { Signup.count() == 1 ? "" : Signup[0])) {
DBG
poco_information( poco_information(
Logger(), Logger(),
fmt::format("Send new subscriber email verification link to {}", fmt::format("Send new subscriber email verification link to {}",
UInfo.email)); UInfo.email));
} }
DBG
StorageService()->ActionLinksDB().SentAction(i.id); StorageService()->ActionLinksDB().SentAction(i.id);
DBG
} break; } break;
default: { default: {
DBG
StorageService()->ActionLinksDB().SentAction(i.id); StorageService()->ActionLinksDB().SentAction(i.id);
DBG
} }
} }
} }