Hello,
I am trying to register a new user in Sitefinity. I have many custom fields also in the basic profile of Sitefinity. But I am getting "A user with this nickname already exists" exception. When we check in Sitefinity backend users list there is no such user. I tried multiple times with different names but every time it is showing the same error.
Also on analysis, I found that this exception is happening when I try to save some value to the custom fields in Sitefinity basic profile. But that custom fields are not at all depending on the Nickname
Message: Telerik.Sitefinity.ModelValidationException: A user with this nickname already exists.
at DynamicModule.ns.Wrapped_OpenAccessProfileProvider_53e4abda40a1409abf26fc8d136e21d7.CommitTransaction() at ...
This is the log I get. Can anyone please help me with this issue.
On analysis I think that the exception is happening when I try to save a custom profile field in the basic profile.
Following is the code I use. I am not sure why this exception is coming when I try to save a field which is not depending on the nickname.
SitefinityProfile sfProfile = profileManager.CreateProfile(user, Guid.NewGuid(), typeof(SitefinityProfile)) as SitefinityProfile;
if (sfProfile.DoesFieldExist("PocketGuidePushNotifications"))
{
sfProfile.SetValue("PocketGuidePushNotifications", true);
profileManager.SaveChanges(); // Exception when executing this line
}
"PocketGuidePushNotifications" this is the name of custom Sitefinity user field I created in Basic profile.
Can anyone please help me with this issue?
Thanks,
Aiswarya
Did you also check current users nickname? This can probably lead to a similar error