mirror of
https://github.com/Telecominfraproject/wlan-cloud-ucentralsec.git
synced 2025-10-31 18:57:51 +00:00
Refactor users/tokens into orm.
This commit is contained in:
@@ -77,7 +77,7 @@ namespace OpenWifi {
|
||||
}
|
||||
|
||||
SecurityObjects::UserInfo UInfo;
|
||||
if(!StorageService()->GetUserById(Link.userId,UInfo)) {
|
||||
if(!StorageService()->UserDB().GetUserById(Link.userId,UInfo)) {
|
||||
Poco::File FormFile{ Daemon()->AssetDir() + "/password_reset_error.html"};
|
||||
Types::StringPairVec FormVars{ {"UUID", Id},
|
||||
{"ERROR_TEXT", "This request does not contain a valid user ID. Please contact your system administrator."}};
|
||||
@@ -97,7 +97,7 @@ namespace OpenWifi {
|
||||
{"ERROR_TEXT", "You cannot reuse one of your recent passwords."}};
|
||||
return SendHTMLFileBack(FormFile,FormVars);
|
||||
}
|
||||
StorageService()->UpdateUserInfo(UInfo.email,Link.userId,UInfo);
|
||||
StorageService()->UserDB().UpdateUserInfo(UInfo.email,Link.userId,UInfo);
|
||||
Poco::File FormFile{ Daemon()->AssetDir() + "/password_reset_success.html"};
|
||||
Types::StringPairVec FormVars{ {"UUID", Id},
|
||||
{"USERNAME", UInfo.email},
|
||||
@@ -118,7 +118,7 @@ namespace OpenWifi {
|
||||
}
|
||||
|
||||
SecurityObjects::UserInfo UInfo;
|
||||
if (!StorageService()->GetUserById(Link.userId, UInfo)) {
|
||||
if (!StorageService()->UserDB().GetUserById(Link.userId, UInfo)) {
|
||||
Types::StringPairVec FormVars{{"UUID", Link.id},
|
||||
{"ERROR_TEXT", "This does not appear to be a valid email verification link.."}};
|
||||
Poco::File FormFile{Daemon()->AssetDir() + "/email_verification_error.html"};
|
||||
@@ -130,7 +130,7 @@ namespace OpenWifi {
|
||||
UInfo.validated = true;
|
||||
UInfo.lastEmailCheck = std::time(nullptr);
|
||||
UInfo.validationDate = std::time(nullptr);
|
||||
StorageService()->UpdateUserInfo(UInfo.email, Link.userId, UInfo);
|
||||
StorageService()->UserDB().UpdateUserInfo(UInfo.email, Link.userId, UInfo);
|
||||
Types::StringPairVec FormVars{{"UUID", Link.id},
|
||||
{"USERNAME", UInfo.email},
|
||||
{"ACTION_LINK",MicroService::instance().GetUIURI()}};
|
||||
|
||||
Reference in New Issue
Block a user