Forum


HomeHomePublicPublicDevelopmentDevelopmentUserUpdateUserUpdate
Previous
 
Next
New Post
9/16/2014 5:09 AM
 
Hi! I am workng on a new project, customizing DNN. I have made a custom control for managing users. I am having issues with UpdateUser method, if called once, it seems to work, if I reload form and I call GetUserbyID it works,but nothing changed in users table of database.


this is my code:


                UserInfo selectedUser = UserController.GetUserById(PortalId, Convert.ToInt32(Request.QueryString["UserId"]));
                selectedUser.Email = Email;
                selectedUser.Username = UserName;
                selectedUser.DisplayName = displayName;
                selectedUser.Membership.Password = Password;
                selectedUser.Membership.UpdatePassword = true;
                
                DotNetNuke.Entities.Users.UserController.UpdateUser(PortalId, selectedUser);


many thanks

Jonathan

 
New Post
9/16/2014 5:37 AM
 

Hi Jonathan,

1 - Once a user is created on DNN, you cannot change the Username - That is the first problem;

2 - To update user's passwords you need to use a different method - UserController.ChangePassword

I would try this.

Cheers,

Aderson

 
New Post
9/18/2014 12:18 AM
 

Thank you ;)

 
Previous
 
Next
HomeHomePublicPublicDevelopmentDevelopmentUserUpdateUserUpdate



Try FREE
30 days money back guaranteed