Skip to content

Commit

Permalink
fix: 修改编辑用户失败
Browse files Browse the repository at this point in the history
  • Loading branch information
WangJunZzz committed Jun 9, 2023
1 parent fc35c4a commit 26ca784
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,7 @@ public async Task<IdentityUserDto> CreateAsync(IdentityUserCreateDto input)
{
// abp 5.0 之后新增字段,是否运行用户登录,默认设置为true
input.IsActive = true;
using (var uow = UnitOfWorkManager.Begin(new AbpUnitOfWorkOptions() { IsTransactional = true }, true))
{
await _identityUserAppService.CreateAsync(input);
await uow.CompleteAsync();
}
return null;
return await _identityUserAppService.CreateAsync(input);
}

/// <summary>
Expand All @@ -96,12 +91,7 @@ public async Task<IdentityUserDto> CreateAsync(IdentityUserCreateDto input)
public virtual async Task<IdentityUserDto> UpdateAsync(UpdateUserInput input)
{
input.UserInfo.IsActive = true;
using (var uow = UnitOfWorkManager.Begin(new AbpUnitOfWorkOptions() { IsTransactional = true }, true))
{
await _identityUserAppService.UpdateAsync(input.UserId, input.UserInfo);
}

return null;
return await _identityUserAppService.UpdateAsync(input.UserId, input.UserInfo);
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ private void ConfigureJwtAuthentication(ServiceConfigurationContext context, ICo
ValidateIssuer = true,
ValidateAudience = true,
ValidateLifetime = true,
//ClockSkew = TimeSpan.Zero,
ClockSkew = TimeSpan.Zero,
ValidIssuer = configuration["Jwt:Issuer"],
ValidAudience = configuration["Jwt:Audience"],
IssuerSigningKey =
Expand Down

0 comments on commit 26ca784

Please sign in to comment.