Merge branch 'feature-customer-management-cus005' into feature-customer-management
This commit is contained in:
+13
@@ -59,3 +59,16 @@ void UserManagementService::createUser(const std::string& username, const std::s
|
||||
inventoryManagementService.attach(newUser);
|
||||
}
|
||||
}
|
||||
|
||||
void UserManagementService::updateUserDetails(const std::string& userID, const std::string& email, const std::string& phone)
|
||||
{
|
||||
auto& usersMap = m_dataStore.getUsers();
|
||||
int index = usersMap.find(userID);
|
||||
if (index == -1)
|
||||
{
|
||||
throw std::runtime_error("User does not exist!");
|
||||
}
|
||||
User* user = usersMap.getValueAt(index);
|
||||
user->setEmail(email);
|
||||
user->setPhone(phone);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user