Skip to content

Commit

Permalink
剔除不再使用的方法。 💅
Browse files Browse the repository at this point in the history
  • Loading branch information
PopeyeZhong committed Feb 4, 2024
1 parent 7e06c4a commit b42c42f
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions Zongsoft.Security/src/Membership/Utility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,5 @@ internal static Condition GetIdentityCondition(string identity, out UserIdentity
identityType = UserIdentityType.Name;
return Condition.Equal(nameof(IUserModel.Name), identity);
}

internal static UserIdentityType GetIdentityType(string identity)
{
if(string.IsNullOrEmpty(identity))
throw new ArgumentNullException(nameof(identity));

if(identity.Contains('@'))
return UserIdentityType.Email;

if(identity.IsDigits())
return UserIdentityType.Phone;

return UserIdentityType.Name;
}
}
}

0 comments on commit b42c42f

Please sign in to comment.