Merge branch 'feature-admin-management-adm005' into feature-admin-management
This commit is contained in:
+11
-1
@@ -1,8 +1,18 @@
|
||||
#include "AuthenticationManagementService.h"
|
||||
#include "User.h"
|
||||
|
||||
User* AuthenticationManagementService::m_authenticatedUser = nullptr;
|
||||
|
||||
void AuthenticationManagementService::logout()
|
||||
{
|
||||
m_authenticatedUser = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
void AuthenticationManagementService::changePassword(const std::string& newPassword)
|
||||
{
|
||||
if (m_authenticatedUser == nullptr)
|
||||
{
|
||||
throw std::runtime_error("There is no user currently logged in!");
|
||||
}
|
||||
m_authenticatedUser->setPassword(newPassword);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user