Skip to content

Commit a187bfb

Browse files
authored
Merge pull request #52 from AnonymousDotNet/lida_Dev
Lida dev
2 parents a336cc9 + 3f6a63b commit a187bfb

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/Infrastructure/BotSharp.Core/Users/Services/UserService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ public async Task<bool> VerifyUserNameExisting(string userName)
525525

526526
public async Task<bool> VerifyEmailExisting(string email)
527527
{
528-
if (string.IsNullOrEmpty(email))
528+
if (string.IsNullOrWhiteSpace(email))
529529
{
530530
return true;
531531
}
@@ -542,7 +542,7 @@ public async Task<bool> VerifyEmailExisting(string email)
542542

543543
public async Task<bool> VerifyPhoneExisting(string phone, string regionCode)
544544
{
545-
if (string.IsNullOrEmpty(phone))
545+
if (string.IsNullOrWhiteSpace(phone))
546546
{
547547
return true;
548548
}

src/Infrastructure/BotSharp.OpenAPI/ViewModels/Users/UserViewModel.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using BotSharp.Abstraction.Users.Enums;
2-
using BotSharp.Core.Infrastructures;
32
using System.Text.Json.Serialization;
43

54
namespace BotSharp.OpenAPI.ViewModels.Users;
@@ -58,8 +57,10 @@ public static UserViewModel FromUser(User user)
5857
UserName = user.UserName,
5958
FirstName = user.FirstName,
6059
LastName = user.LastName,
61-
Email = Utilities.HideMiddleDigits(user.Email, true),
62-
Phone = Utilities.HideMiddleDigits((!string.IsNullOrWhiteSpace(user.Phone) ? user.Phone.Replace("+86", String.Empty) : user.Phone)),
60+
//Email = Utilities.HideMiddleDigits(user.Email, true),
61+
//Phone = Utilities.HideMiddleDigits((!string.IsNullOrWhiteSpace(user.Phone) ? user.Phone.Replace("+86", String.Empty) : user.Phone)),
62+
Email = user.Email,
63+
Phone = !string.IsNullOrWhiteSpace(user.Phone) ? user.Phone.Replace("+86", String.Empty) : user.Phone,
6364
Type = user.Type,
6465
Role = user.Role,
6566
Source = user.Source,

0 commit comments

Comments
 (0)