[User Mgmt]: Update local user enabled state cache

Added missing user enabled state update, to reflect the
enabled state immediately.

Tested-by:
1.verified updated user enabled state is reflected immediately
by querying getaccess for the user id

Change-Id: I42f7cbbe5a1bec9ffaafa61d5c550ea914bddc9c
Signed-off-by: Richard Marian Thomaiyar <richard.marian.thomaiyar@linux.intel.com>
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 @@
         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;
 }