Hi!
After upgrade from 4.8 to 6.2.2 I cannot not update login credentials for existing users.
The following code:
var person = customerPerson.MakeWritableClone();
person.LoginCredential.Username = string.IsNullOrEmpty(customerPerson.Email) ? customerPerson.Id : customerPerson.Email;
person.LoginCredential.NewPassword = customerPerson.Id;
_personService.Update(person);
gives me:
Database operation expected to affect 1 row(s) but actually affected 0 row(s). Data may have been modified or deleted since entities were loaded. See http://go.microsoft.com/fwlink/?LinkId=527962 for information on understanding and handling optimistic concurrency exceptions.
vid Litium.Application.Data.LitiumDbContext.SaveChanges(Boolean acceptAllChangesOnSuccess)
vid Litium.Application.Data.Batching.BatchDataImpl.Commit()
vid Litium.Application.Customers.PersonServiceImpl.Update(Person person)
vid Litium.Studio.Integration.Implementation.Imports.CustomerImportLogic.SetupCustomerUserAccount(Person customerPerson, Boolean shouldActivate, Boolean isNew) i D:\Projekt\Fresks\Development\Web\Src\Litium.Studio.Integration.Implementation\Imports\CustomerImportLogic.cs:rad 209
vid Litium.Studio.Integration.Implementation.Imports.CustomerImportLogic.UpdateCustomer(Item item, Person customerPerson) i D:\Projekt\Fresks\Development\Web\Src\Litium.Studio.Integration.Implementation\Imports\CustomerImportLogic.cs:rad 198
vid Litium.Studio.Integration.Implementation.Imports.CustomerImportLogic.CreateOrUpdateCustomer(Item item) i D:\Projekt\Fresks\Development\Web\Src\Litium.Studio.Integration.Implementation\Imports\CustomerImportLogic.cs:rad 164
vid Litium.Studio.Integration.Implementation.Imports.CustomerImportLogic.ProcessItem(Item item) i D:\Projekt\Fresks\Development\Web\Src\Litium.Studio.Integration.Implementation\Imports\CustomerImportLogic.cs:rad 113
If I try to update login credentials from Litium backoffice I get “An error has occured”.
I guess it is the same error as when I try to update from code.
Thanks!
/Kristoffer
Litium version: 6.2.2.