Merge pull request #52 from AnonymousDotNet/lida_Dev

Lida dev
This commit is contained in:
Haiping 2024-11-26 08:05:09 -06:00 committed by GitHub
commit a187bfb450
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View file

@ -525,7 +525,7 @@ public class UserService : IUserService
public async Task<bool> VerifyEmailExisting(string email)
{
if (string.IsNullOrEmpty(email))
if (string.IsNullOrWhiteSpace(email))
{
return true;
}
@ -542,7 +542,7 @@ public class UserService : IUserService
public async Task<bool> VerifyPhoneExisting(string phone, string regionCode)
{
if (string.IsNullOrEmpty(phone))
if (string.IsNullOrWhiteSpace(phone))
{
return true;
}

View file

@ -1,5 +1,4 @@
using BotSharp.Abstraction.Users.Enums;
using BotSharp.Core.Infrastructures;
using System.Text.Json.Serialization;
namespace BotSharp.OpenAPI.ViewModels.Users;
@ -58,8 +57,10 @@ public class UserViewModel
UserName = user.UserName,
FirstName = user.FirstName,
LastName = user.LastName,
Email = Utilities.HideMiddleDigits(user.Email, true),
Phone = Utilities.HideMiddleDigits((!string.IsNullOrWhiteSpace(user.Phone) ? user.Phone.Replace("+86", String.Empty) : user.Phone)),
//Email = Utilities.HideMiddleDigits(user.Email, true),
//Phone = Utilities.HideMiddleDigits((!string.IsNullOrWhiteSpace(user.Phone) ? user.Phone.Replace("+86", String.Empty) : user.Phone)),
Email = user.Email,
Phone = !string.IsNullOrWhiteSpace(user.Phone) ? user.Phone.Replace("+86", String.Empty) : user.Phone,
Type = user.Type,
Role = user.Role,
Source = user.Source,