summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--user_channel/user_mgmt.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/user_channel/user_mgmt.cpp b/user_channel/user_mgmt.cpp
index a21da8c..86f51da 100644
--- a/user_channel/user_mgmt.cpp
+++ b/user_channel/user_mgmt.cpp
@@ -658,6 +658,16 @@ ipmi_ret_t UserAccess::setUserEnabledState(const uint8_t userId,
std::string userPath = std::string(userObjBasePath) + "/" + userName;
setDbusProperty(bus, getUserServiceName(), userPath, usersInterface,
userEnabledProperty, enabledState);
+ userInfo->userEnabled = enabledState;
+ try
+ {
+ writeUserData();
+ }
+ catch (const std::exception& e)
+ {
+ log<level::DEBUG>("Write user data failed");
+ return IPMI_CC_UNSPECIFIED_ERROR;
+ }
}
return IPMI_CC_OK;
}
OpenPOWER on IntegriCloud