Merge branch 'feature-customer-management-cus003' into feature-customer-management
This commit is contained in:
+10
@@ -1,3 +1,4 @@
|
||||
#include <stdexcept>
|
||||
#include "AuthenticationManagementService.h"
|
||||
#include "User.h"
|
||||
|
||||
@@ -32,3 +33,12 @@ 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