Browse Source
Merge pull request #20472 from abpframework/20460
Trim the changed value when users change their first or last name.
pull/20480/head
SALİH ÖZKARA
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
4 additions and
4 deletions
-
modules/account/src/Volo.Abp.Account.Application/Volo/Abp/Account/ProfileAppService.cs
-
modules/identity/src/Volo.Abp.Identity.Application/Volo/Abp/Identity/IdentityUserAppService.cs
|
|
|
@ -68,8 +68,8 @@ public class ProfileAppService : IdentityAppServiceBase, IProfileAppService |
|
|
|
(await UserManager.SetPhoneNumberAsync(user, input.PhoneNumber)).CheckErrors(); |
|
|
|
} |
|
|
|
|
|
|
|
user.Name = input.Name; |
|
|
|
user.Surname = input.Surname; |
|
|
|
user.Name = input.Name?.Trim(); |
|
|
|
user.Surname = input.Surname?.Trim(); |
|
|
|
|
|
|
|
input.MapExtraPropertiesTo(user); |
|
|
|
|
|
|
|
|
|
|
|
@ -184,8 +184,8 @@ public class IdentityUserAppService : IdentityAppServiceBase, IIdentityUserAppSe |
|
|
|
user.SetIsActive(input.IsActive); |
|
|
|
} |
|
|
|
|
|
|
|
user.Name = input.Name; |
|
|
|
user.Surname = input.Surname; |
|
|
|
user.Name = input.Name?.Trim(); |
|
|
|
user.Surname = input.Surname?.Trim(); |
|
|
|
(await UserManager.UpdateAsync(user)).CheckErrors(); |
|
|
|
if (input.RoleNames != null && await PermissionChecker.IsGrantedAsync(IdentityPermissions.Users.ManageRoles)) |
|
|
|
{ |
|
|
|
|