Is there any way to update current user's UserInfo?
Suppose a user registered with an email and password,I have customized the CMS_User and added field as MyCV which is a GUID type.Upon logged in,I am trying to upload a file but when the code hits update,it always results in exception.As the user is already logged in and if we try to change the UserInfo,the code might be unstable but is there any workaround in that particular case.
I have tried creating another object of the UserInfo but still gave the same exception.
UserInfo updateUser = UserInfoProvider.GetUserInfo(CurrentUser);
if (updateUser != null)
// Update the properties
updateUser.FullName = updateUser.FullName.ToLower();
// My Other Code
// Save the changes
**UserInfoProvider.SetUserInfo(updateUser);** *//Exception Occurs*
When are you trying to do this? When a user is registering? If so, you might want to make it a multi-step process.
No, after primary registration of the user,the user is logged in.Now after that,the user needs to update his other fields.How can I update do this?
Have you tried UserProfile web part with the alternative form for user? In this scenario you do not need to implement custom code - Kentico already handles that.
See http://www.kentico.com/Product/All-Features/Social-Networking/User-Profiles to get better idea what I'm talking about.
Please, sign in to be able to submit a new answer.