Starts in:
1 DAY
9 HRS
26 MIN
21 SEC
Starts in:
1 D
9 H
26 M
21 S
Open Closed

user information update api #2834


User avatar
0
shobhit created
  • ABP Framework version: v4.2.2
  • UI type: Angular
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi Team, WHat is the API/ Reporsitory i have to use to update user information like name, surname, email and phone no. I have tried with IIdentityUserRepository.Update() and IdentityUserAppService.Update() method but i am getting error. Considering i am doing this using Host --> Admin role user.


2 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    I have tried with IIdentityUserRepository.Update() and IdentityUserAppService.Update() method but i am getting error

    What error? can you share the error logs?

  • User Avatar
    0
    shobhit created

    Thanks it's resolved.

    i was not passing "ConcurrencyStamp" and it was breaking the update code.

    IdentityUserDto identityUser = await _identityUserAppService.GetAsync(input.AppUserId);

            IdentityUserUpdateDto identityUserUpdateDto = new()
            {
                Email = input.Email,
                Name = input.Name,
                Surname = input.Surname,
                PhoneNumber = input.PhoneNumber,
                UserName = identityUser.UserName,
                ConcurrencyStamp = identityUser.ConcurrencyStamp                
            };            
    
            _ = await _identityUserAppService.UpdateAsync(input.AppUserId, identityUserUpdateDto);
    
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06