Hi Everyone, We are new to DNN Framework. Currently working on DNN 07.04.01 (280) version. We are working on "UserAccounts" module. We have controller called "UserController.cs". we are not able to add or edit this source file , meaning we can able to change the code but it does not affect the changes while debugging the file, it executes the same older code and not even recognize the new code.
Is there any solution to resolve this issue? It would be appreciable. Please help us to get into this.
public HttpResponseMessage Update([FromBody] JObject jsonData)
{
var user = jsonData.ToObject<CMSUser>();
var password = user.Password;
var apiToken = user.Token;
HttpResponseMessage response;
var pwd = password;
//dynamic json = jsonData;
//JValue apiToken = json["apiToken"];
//JObject userJson = json["user"];
if (password == null ||
apiToken == null ||
InitializeApiRequest(apiToken.ToString(CultureInfo.InvariantCulture)) != null)
{
return Request.CreateResponse(HttpStatusCode.BadRequest, ApiResponse);
}
//var user = userJson.ToObject<CMSUser>();
UserInfo dnnUser;
//HttpResponseMessage response;
if (!UpdateDnnUserWithCMSUser(user, out dnnUser, out response)) { return response; }
try
{
DotNetNuke.Entities.Users.UserController.UpdateUser(PortalSettings.PortalId, dnnUser);
ApiResponse = new DnnApiResponse(true, "User Updated", user);
}
catch (Exception e)
{
ApiResponse = new DnnApiResponse(false, "User Update Failed: " + e.Message);
}
return Request.CreateResponse(HttpStatusCode.BadRequest, ApiResponse);
}