mirror of
https://github.com/anjoy8/Blog.Core.git
synced 2024-09-20 23:48:27 +08:00
Update AspNetUser.cs
This commit is contained in:
parent
8ed7077075
commit
a27b04f121
|
@ -22,7 +22,7 @@ namespace Blog.Core.Common.HttpContextUser
|
|||
|
||||
private string GetName()
|
||||
{
|
||||
if (IsAuthenticated())
|
||||
if (IsAuthenticated() && _accessor.HttpContext.User.Identity.Name.IsNotEmptyOrNull())
|
||||
{
|
||||
return _accessor.HttpContext.User.Identity.Name;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user